[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread Romain Guy
Hi, It looks like a bug in the VelocityTracker. Can you please file it at b.android.com? Thanks On Tue, Mar 31, 2009 at 10:28 AM, focuser linto...@gmail.com wrote: Hi, I'm trying to use a GestureDetector in a subclass of FrameLayout, which has a child ListView. But it seems the

[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread focuser
Thanks Romain, I have just filed it http://code.google.com/p/android/issues/detail?id=2337. But before it's fixed in a new release, is there any workaround or I will have to play with the VelocityTracker myself? On Mar 31, 10:39 am, Romain Guy romain...@google.com wrote: Hi, It looks like a

[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread Romain Guy
Unfortunately I don't see any possible workaround :( On Tue, Mar 31, 2009 at 11:40 AM, focuser linto...@gmail.com wrote: Thanks Romain, I have just filed it http://code.google.com/p/android/issues/detail?id=2337. But before it's fixed in a new release, is there any workaround or I will

[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread focuser
OK, but could you explain briefly why the GestureDetector would have such side effect? In the code above I don't see any events being stolen nor any new events being created. Original events are just passed to FrameLayout.dispatchTouchEvent as if there's no GestureDetector used. I even tried

[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread Romain Guy
The problem comes from the VelocityTracker used by the GestureDetector. The tracker has a pool of 1 instance but there's a bug in the pool management which causes both your GestureDetector and ListView to use the *same* VelocityTracker. This means the tracker receives most events twice. I just

[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread focuser
Great! Will it fix the problem in my app if I pull GestureDetector.java from Cupcake and include/use it in my code? On Mar 31, 4:05 pm, Romain Guy romain...@google.com wrote: The problem comes from the VelocityTracker used by the GestureDetector. The tracker has a pool of 1 instance but

[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread Romain Guy
No because the issue is in VelocityTracker :) On Tue, Mar 31, 2009 at 4:39 PM, focuser linto...@gmail.com wrote: Great! Will it fix the problem in my app if I pull GestureDetector.java from Cupcake and include/use it in my code? On Mar 31, 4:05 pm, Romain Guy romain...@google.com wrote:

[android-developers] Re: Strange GestureDetector side effect when used in a subclass of FrameLayout?

2009-03-31 Thread focuser
good point. Thanks Romain. :) On Mar 31, 5:37 pm, Romain Guy romain...@google.com wrote: No because the issue is in VelocityTracker :) On Tue, Mar 31, 2009 at 4:39 PM, focuser linto...@gmail.com wrote: Great! Will it fix the problem in my app if I pull GestureDetector.java from