Image Viewer

Monkey Targets Forums/Android/Image Viewer

darky000(Posted 2014) [#1]
Hello guys,

I wanted to create an app with an image viewer that has functions like the zoom (two fingers touched then spread apart), swipe (to move to the next page or scroll down).

I'm not sure how to create this in monkey. Are there functionality here or am I screwed and have to learn Android specific languages?

EDIT: Maybe I can do a brute force with using two TouchHit() and get the relative distance and scale from there but I I would like to avoid this if possible.


Supertino(Posted 2014) [#2]
You need to create the gestures you're self though I am sure if you did a search you'll find suitable code ready to go. As to getting the images (from camera, SD,internal etc) that will likely take a lot more work speaking directly to the android code base it's not built into the Monkey.


darky000(Posted 2014) [#3]
I'm not going to use any camera features though. Just the ability to manipulate commands with touch like any phones do.


darky000(Posted 2014) [#4]
So I've found an article talking about touch features and how they are implemented.
http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2-part-5-implementing-the-drag-gesture/1789

If I could just ask if there is a possibility of testing two touches with html5? Is there an alternate key for a second touch?


Raph(Posted 2014) [#5]
TouchDown(0) gives the first finger, TouchDown(1) gives the second, and so on. Same with TouchHit, etc.

If you google for swipe code, you'll quickly find two or three libraries that do basic one-finger gestures. You should be able to then see whether the touch end points are moving away from each other or towards each other.


Raph(Posted 2014) [#6]
I meant google on this forum, by the way. Something like "monkey-x gesture" should find several.