zoom pinch functionality on image shown from a url in blackberry?
-
10-06-2021 - |
Question
I am preparing a Blackberry app in which I prepare an HTTP connection and from a URL I display an image on the screen.
Now on touch listener I am showing this image on other screen and want to perform Zoom-pinch functionality with that image from URL.
The image is not in my device memory, it is directly shown from the HTTP connection. I want to run this app on 5.0+ devices. Please suggest how can I achieve this?
Solution
Try following steps:
Get the image from URL.
Convert the image to EncodedImage.
Create a ZoomScreen instance and display it.
Creating and displaying a ZoomScreen
private void showImage(EncodedImage image) {
synchronized (UiApplication.getEventLock()) {
UiApplication.getUiApplication().pushScreen(new ZoomScreen(image));
}
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow