Alvaro
Alvaro

Reputation: 57

How to use ScrollView and HorizontalScrollView at the same time in a same View in Android

I am developing an application in which the user can take photos, and then each photo can be displayed in a View using its painted with the method onDraw().

The problem is that as the captured image is high-resolution, does not fit the physical screen of the device, and only paint a part of it. For this reason, I want to give both the functionality of ScrollView as the HorizontalScrollView this View where it is shown that image, and can thus traverse the entire image without problems.

Anyone who could help me I appreciate it!!! Thank you very much.

Upvotes: 1

Views: 342

Answers (2)

JASON G PETERSON
JASON G PETERSON

Reputation: 2223

If I understand your needs correctly, I think you would be better off using the ImageViewTouch library which is published on GitHub under an MIT license. It lets you load a large bitmap with any zoom setting and then the user can use common gestures to pan/zoom it. Very easy to set up. I used it in several places in my app.

Upvotes: 1

Ganesh AB
Ganesh AB

Reputation: 4698

You need Two Way View, please check below link.

https://github.com/lucasr/twoway-view

Upvotes: 0

Related Questions