This question is locked. New answers and comments are not allowed.
Hi,
Is there any documentation or advice for how to use local image files in a NativeScript application?
I see that a folder called App_Resources is automatically created with each application that includes the image files for the application's icon and splash screen. But if I want to use additional images as part of the UI on pages, can these be included in a separate folder (eg. app/images) or must they be in the App_Resources folder?
If I then need to reference these images in, say, a ListView template, do I include an image-source variable in the page model and then bind it to an <Image> attribute in the page's XML file? A code example to illustrate this would be really helpful.
Finally, I assume I might need to include different versions of each image to cater for the different resolution screens on iOS and Android phones. Are there any NativeScript functions to help determine which image would be best to use on a specific handset?
Regards, Ian
Is there any documentation or advice for how to use local image files in a NativeScript application?
I see that a folder called App_Resources is automatically created with each application that includes the image files for the application's icon and splash screen. But if I want to use additional images as part of the UI on pages, can these be included in a separate folder (eg. app/images) or must they be in the App_Resources folder?
If I then need to reference these images in, say, a ListView template, do I include an image-source variable in the page model and then bind it to an <Image> attribute in the page's XML file? A code example to illustrate this would be really helpful.
Finally, I assume I might need to include different versions of each image to cater for the different resolution screens on iOS and Android phones. Are there any NativeScript functions to help determine which image would be best to use on a specific handset?
Regards, Ian