-2

I am currently trying to figure out which way is best to display a picture in an Android app. The picture will be a map and will be a big picture (3000x3000 pixels). I would like to add the ability to pinch zoom into the picture and move the image around the screen but not have the scale of the image changed. I have played around with a lot of solutions that when the image is moved it is auto re-sized. Is there a way of doing this? Thanks.

Jared
  • 33
  • 1
  • 8
  • 1
    "I would like to add the ability to pinch zoom into the picture and move the image around the screen but not have the scale of the image changed." - if you are zooming, the scale will definitely be changing... – stkent Jan 12 '15 at 13:57
  • Is there a way to make it so the re-sizing does not alter the original ratios of the image? – Jared Jan 12 '15 at 13:58
  • Ah, fixed scale != fixed aspect ratio. You should have no problem fixing the aspect ratio. – stkent Jan 12 '15 at 13:59
  • 1
    See e.g. http://stackoverflow.com/questions/16894215/how-pinch-zoom-image-in-image-zoom-android for some suggestions. – stkent Jan 12 '15 at 14:00
  • I didn't get "The picture will be a map" , Do you mean that your images are divided into tiles with different zoom levels ? – Shubhang Malviya Jan 12 '15 at 14:07
  • No, the content on the image itself will be a map. It's just a picture – Jared Jan 12 '15 at 14:10

1 Answers1

0

However I have used many libraries for loading large images but subsampling-scale-image-view is the best library I found and also it supports a variety of gesture support.

Gesture detection

  1. One finger pan
  2. Two finger pinch to zoom
  3. Pan while zooming
  4. Seamless switch between pan and zoom
  5. Fling momentum after panning
  6. Double tap to zoom in and out
  7. Options to disable pan and/or zoom gestures

Supports interception of events using GestureDetector and OnTouchListener Extend to add your own gestures

Njoy!

Shubhang Malviya
  • 1,525
  • 11
  • 17