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?

Was it helpful?

Solution

Try following steps:

  1. Get the image from URL.

  2. Convert the image to EncodedImage.

  3. 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
scroll top