I am new to processing and I’ve been looking for a while for a way to zoom and drag for my andriod app. I don’t need it to be very robust. just something to zoom in and drag around a certain sketch. I have ideas but I am mostly lost. I believe I could use the scale and transform, function. If there are any built-in function, please also let me know. Thanks a lot!
You should be able to use gestures in android for this. The Ketai library provides a sample implementation of different gestures. Run the example code which you can access after you install the library or you can explore directly here. What you should do next is how to combine the gestures so they work together. Zoom and drag should work. Zoom can be managed using pinch and drag would be mouseDragged or mousePressed. Just to clarify, you might be referring to panning instead of dragging. I like to think that dragging means you pick an object first, and then you drag it.
Kf
2 Likes
Thanks a lot. Thanks for the correction as well, I think i meant panning.