Closed abhayastudios closed 6 years ago
Oh never mind, I succeeded right after opening this issue:
import { WebImage } from "nativescript-web-image-cache";
[...]
let photo = new WebImage();
photo.src=item.photoUrl;
photo.stretch='aspectFill';
grid.addChild(photo);
GridLayout.setRow(photo,0);
Is it possible to add a
WebImage
element to say aGridLayout
by code instead of markup? So for example for adding aLabel
element I could do something like this:I see the plugin extends the
tns-core-modules/ui/core/view
so it must be possible, I just am unsure which imports to make to refer to WebImage.Thanks for this great plugin!