Image zooming/panning inside of a Gallery

by Eric F » Wed, 02 Jun 2010 01:54:54 GMT


Sponsored Links
 I'm trying to combine the capability of doing image zoom/panning
inside of a Gallery view. The problem is controlling which touch
events are processed by each. In a horizontal drag on the image, the
ImageView needs to process the drag in order to pan, up until the edge
of the image is reached then the gallery view needs to process the
touch event so that it can swipe over to the next photo.

It seems that if I return false from the imageview's ontouchevent,
then I won't be notified of the panning-drag move events.

What I tried to do was return true from the imageview's ontouchevent
until the edge of the image was hit then return false. However I
believe that this doesn't cause the Gallery to begin processing these
events, as it missed the initial touchdown event.

My next thought is to somehow turn the containing activity into the
touch handler, and somehow stop the Gallery and ImageView from getting
touch events normally, and have the activity forward the touch event's
manually. Not sure if this is possible or if there is an example.

My last resort will be to simply not use the android.widget.Gallery,
which I want to avoid because I want the widget to "feel" the same as
other places on the phone, and I like code re-use. Unfortunately I
might have to do this, as I see all other apps that have this zoom/pan
capability don't seem to use the Gallery widget (Gallery3D etc).

My question is, what's the best way to design for this situation where
motionevents need to split between two views? Any ideas would be
greatly appreciated thank you.

--



Other Threads

1. Root Nexus One Froyo 2.2.2

Halo rekan-rekan,
kemaren N1 saya yang memang standar/mint OSnya update OTA ke 2.2.2, sekarang
pengen nyicip Gingerbread jadinya mau root pake cara yang disini ga bisa -
http://forum.xda-developers.com/showthread.php?t=792016

Stucknya abis run rageagainstthecage, restart adb server, trus adb shell
lagi promptnya masih user standar $ bukan root #.

Ada yang bisa share ide/pengalaman mungkin?

Many thanks
Pria Purnama
I design kickass websites - http://priapurnama.me/

-- 
===============
"

2. ramdisk as Android file system.

Hi All,

I am finding difficult to compile SDK to get the ramdisk. Is there a place
to download precompiled ramdisk images for ARM-Android.

I already have my kernel built. Now i am looking to boot my kernel using
ramdisk can some one show some pointers on this.

Best Regrads,
Srikar

-- 

3. OOT Picplz user ID

4. some problems about Camera

5. Preview Honeycomb

6. DATABASE

7. Android Market filter problems