Can someone show an example on how to tell if a fling as gone left or right or a scroll has gone left or right? I cannot seem to find any documentation on this
On Nov 3, 5:06 pm, Rohit Mordani <[email protected]> wrote: > Yes - that also works ! Thanks for letting us know that ! > > Rohit > > On Oct 31, 1:34 pm, hackbod <[email protected]> wrote: > > > > > Fyi, doing that will disable all normal touch event dispatching for > > that view and any of its children. It's really rare that you should > > override a dispatch method, especially doing so and never calling > > through to the super class. > > > The correct thing is almost always to override onTouchEvent(). > > > On Oct 31, 2:05 pm, Rohit Mordani <[email protected]> wrote: > > > > In addition I had to do the following in my view: > > > > @Override > > > public boolean dispatchTouchEvent(MotionEvent ev){ > > > return mGestureDetector.onTouchEvent(ev); > > > > } > > > > Thanks > > > Rohit > > > > On Oct 31, 1:59 pm, Rohit Mordani <[email protected]> wrote: > > > > > Hey Adam and Jason - thanks ! I tried out the things that you guys > > > > said and they make fling / swipe work now ! > > > > > Rohit > > > > > On Oct 31, 12:59 pm, "Jason Parekh" <[email protected]> wrote: > > > > > > If you haven't already, can you try returning true in your onDown > > > > > method? > > > > > > jason > > > > > > On Thu, Oct 30, 2008 at 4:18 PM, Rohit Mordani <[email protected]> > > > > > wrote: > > > > > > > I am facing the same problem. The onFling() method is never called. > > > > > > > I THINK the problem is that in the emulator, pressing the left mouse > > > > > > button is more like a tap and that sets the MotionEvent.Action to be > > > > > > ACTION_DOWN. As a result the onDown() method of the > > > > > > OnGestureListener > > > > > > is called instead of onFling(). There might be a way to emulate the > > > > > > fling in the emulator but I am not sure of it. If anyone finds out > > > > > > then please let me know. That would then call onFling() correctly I > > > > > > think > > > > > > > Rohit > > > > > > > On Oct 29, 2:12 pm, zl25drexel <[email protected]> wrote: > > > > > > > Erik, > > > > > > > > I tried your codes, the onScroll and onFling method are still not > > > > > > > being called. > > > > > > > > On Oct 11, 7:10 pm, Erik Calissendorff <[email protected]> > > > > > > > wrote: > > > > > > > > > Hi Kingtut, > > > > > > > > > I believe that this code should work for you, I use this > > > > > > > > solution in > > > > > > > > my Activity: > > > > > > > > > @Override > > > > > > > > public boolean dispatchTouchEvent(MotionEvent ev) { > > > > > > > > boolean returnValue=false; > > > > > > > > returnValue=returnValue | mGestureDetector.onTouchEvent(ev); > > > > > > > > returnValue=returnValue | super.dispatchTouchEvent(ev); > > > > > > > > return returnValue; > > > > > > > > > } > > > > > > > > > Good luck with the development.- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

