android - Placing touch areas on an image that is drag, pinch zoom capable -


i'm looking way place touchable hotspots on image. image (picture desk phone keypad, speaker button, hold, etc) in framelayout wrapped within relativelayout, , has few buttons along bottom. need image dragable, pinch/zoom-able, , have implemented following article:
http://www.zdnet.com/blog/burnette/how-to-use-multi-touch-in-android-2/1747?tag=mantle_skin;content

i've tried few ways embed hotspots including technique (from ip332): http://groups.google.com/group/android-developers/browse_thread/thread/ffabb722efac62b2
uses points determine hotspots. drag & zoom feature, doesn't work because points change whenever drag or zoom. try manually adjust of hotspot locations within ontouch method whenever motion detected, seems bit hairy me.

in dream world, i'd somehow embed imagebuttons within image , have image , imagebuttons scale , move drag & zoom. imagebuttons allow ability give feedback (e.g. color change, etc) when hotspot pressed.

any suggestions?

you can listen touch events, save touched location's x/y coordinates on action_down , compare ones on action_up. if they're close each other , time interval less x miliseconds, have click.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -