Best way to have an overlay for zooming and panning on Android?

I'm relatively new to Android development, and I'm currently developing an application that requires a scalable and scalable image that will have other labels on top of it, similar to MapView, but without using the Google Maps API.

I looked a little and found that I can do part of the overlay by following the method in this question: Draw images on top of each other in android

However, I do not know if this can be done by scaling and / or panning a large image. Would it be wise to create a GLSurfaceView and just implement the necessary functionality, or is it too much because I will reinvent the wheel?

For what it costs, a large image of the map will be displayed from the server (but if necessary it can be divided into smaller square areas), and the icon, which will be superimposed on various positions on the map, will be built into the application itself.

+6
source share
1 answer

Sony Ericsson has made a great PinchZoomable ImageView class. I changed it for my needs. I combined their scaling and single-point scaling (for phones that did not have multi-touch) http://code.google.com/p/motivatormaker-android/source/browse/MakeMotivator/src/com/sonyericsson/zoom/ImageZoomView.java

Their tutorial is here: http://developer.sonymobile.com/2011/04/12/how-to-take-advantage-of-the-pinch-to-zoom-feature-in-your-xperia-10-apps -part-2 /

I got good performance due to using these classes without using OpenGL.

-1
source

Source: https://habr.com/ru/post/907668/


All Articles