Hi!

I want to create a new widget for Android developers which allows to
use the same functionality as seen on the home screen (flipping
between different screens), the calendar (flipping between days) or
TweetDeck (flipping through Twitter columns). The source for the
launcher is there, so I thought this might not take so long:
http://android.git.kernel.org/?p=platform/packages/apps/Launcher.git;a=blob;f=src/com/android/launcher/Workspace.java;h=2e04311f530003dbd76695f46876a785164acb99;hb=HEAD#l572

It seems that the two methods onInterceptTouchEvent() and
onTouchEvent() do all the things that are needed for getting the
events, so I copied them to a new class and removed functionality that
is for the Workspace only. You can see my work-in-progress here:
http://pastebin.com/8p8GCEZK

My problem now is: onInterceptTouchEvent() is always only called once
with the MotionEvent.ACTION_DOWN action so I never get into the
ACTION_MOVE case - where the actual fling would be initiated. I played
around with the return values of onInterceptTouchEvent() (true means
to steal events from children) and the return values of onTouchEvent()
(true means to consume the event), but I didn't get any further.

Is there some kind of magic behind onInterceptTouchEvent() or
onTouchEvent() which I didn't notice? Is my problem even solveable? I
hope so... :-)


Thanks in advance & merry christmas
Marc

PS: I also asked this question on StackOverflow, but didn't get any
answers yet:
http://stackoverflow.com/questions/4455891/android-use-realviewswitcher-to-switch-between-views-like-the-home-screen-does

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to