nativescript-photoviewer
nativescript-photoviewer copied to clipboard
Support of image viewing on Android by passing NativeScript's ImageSource
Hi manijak,
Actually this is a question rather than an issue.
I have a Nativescript application that shows a list of thumbnail images. Those images were retrieved from a protected REST API and store in the application as NS's ImageSource class.
I want to implement a pop up viewer such that when user tap on an thumbnail, an image viewer will be pop up that will show the image in full screen mode.
I have tried this nativescript-photoviewer plugin. It works well for iOS (and really great), as I can pass the ImageSource.ios (which is the underlying UIImage) for display, as indicated by the sample code you provide. However, for Android, it only supports an array of image URLs in string, which I can't provide in my application.
So I just wonder if it's possible to enhance the plugin (or any other way you suggest) to support passing the ImageSource.android instance for image popup display, in addition to image URLs?
I found an Android lib called PhotoView which looks like it support passing an instance of Android bitmap image (i.e. ImageSource.android) for popup display. However, I don't have much Android native app and NS plugin dev experience and not sure how to implement a plugin that wraps the library.
It will be great if you don't mind to share your ideas or thoughts about my problem.
Many thanks in advance. Clarence
Hi @clarenceh , sorry for the late reply. Thanks for the library tip, PhotoView. I will have to take a look at that. The current lib I'm using is a bit limited, pluss that it's ment for only a collection of images.