Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Gallery with pinch zoom

I found a sample project of gallery with pinch zoom and made some bug fix. You can download my code at here

It supports full screen only. It always center the image to screen height. But I want to put a header view to the top of the screen and make the adjustment to the location of the image. The image location should be:

header height + (screen height - header height) / 2

I am not so good at using Matrix. Anyone has idea of how to make the customized gallery to work in any size (not just full screen)?

like image 700
mobile app Beginner Avatar asked Apr 22 '12 14:04

mobile app Beginner


People also ask

Does pinch and zoom change photo?

Pinch-to-zoom on all devices may use algorithms, but only to scale the image — it doesn't change the content itself. This was an attempt to prevent the jury from getting a clearer view of the action, not a genuine challenge to the integrity of the video.

How do you pinch zoom?

Pinch-to-zoom refers to the multi-touch gesture that zooms in or out of the displayed content on a device with a touch screen. These devices include a smartphones and tablets. To use pinch-to-zoom, touch two fingers on the touch screen, and move them apart to zoom in, or together to zoom out.


1 Answers

You can use my Pinch to zoom Gallery project. You can choose any image from gallery and then in onDoubleTap(MotionEvent e) open full image and zoom it.

like image 80
Artyom Kiriliyk Avatar answered Nov 10 '22 03:11

Artyom Kiriliyk