[android-developers] Re: Mouse Gesture for Navigation?

2009-01-23 Thread ena
Hi CVK, the idea that u posted do not worked for me...Could u plz give the exact code that u worked on... Thanks in advance.. On Jan 7, 4:58 am, CVK chetank...@gmail.com wrote: I am able to read flings in left or right directions on a listview and change that listview to a different listview.

[android-developers] Re: Mouse Gesture for Navigation?

2009-01-07 Thread CVK
I am able to read flings in left or right directions on a listview and change that listview to a different listview. To do this I over rode onTouchEvent like the example above. The problem is that in order to detect a fling onTouch has to return true and consume the touch event. Once it returns

[android-developers] Re: Mouse Gesture for Navigation?

2008-11-18 Thread Mr. Gallagher
Would you be able to apply that gesture recognition to a list item? On Nov 6, 9:39 am, joshv [EMAIL PROTECTED] wrote: Actually I've found the following works well: @Override     public boolean dispatchTouchEvent(MotionEvent ev){         gd.onTouchEvent(ev);         return

[android-developers] Re: Mouse Gesture for Navigation?

2008-11-06 Thread joshv
Actually I've found the following works well: @Override public boolean dispatchTouchEvent(MotionEvent ev){ gd.onTouchEvent(ev); return super.dispatchTouchEvent(ev); } calling super.dispatchTouchEvent allows all of the other views to receive their events. For some

[android-developers] Re: Mouse Gesture for Navigation?

2008-11-03 Thread Rohit Mordani
yi, 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().

[android-developers] Re: Mouse Gesture for Navigation?

2008-10-31 Thread Rohit Mordani
I got fling/swipe to work. In one of my other posts someone told me to do the following to make the onFling and Scroll methods to be called: 1) Set View.setLongClickable to true for the view you are using 2) Set GestureHandler.setIsLongpressEnabled to true 3) Return true in your onDown method

[android-developers] Re: Mouse Gesture for Navigation?

2008-10-31 Thread Rohit Mordani
In addition you need to do the following in your view: @Override public boolean dispatchTouchEvent(MotionEvent ev){ return mGestureDetector.onTouchEvent(ev); } Thanks Rohit On Oct 31, 2:01 pm, Rohit Mordani [EMAIL PROTECTED] wrote: I got fling/swipe to work. In one of my other posts

[android-developers] Re: Mouse Gesture for Navigation?

2008-10-30 Thread Rohit Mordani
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

[android-developers] Re: Mouse Gesture for Navigation?

2008-10-30 Thread Romain Guy
A fling is just an ACTION_DOWN, one or more ACTION_MOVE and an ACTION_UP. It has nothing to do with running in the emulator or not. (For what it's worth, a large part of the touch UI and APIs have been developed in the emulator.) On Thu, Oct 30, 2008 at 4:18 PM, Rohit Mordani [EMAIL PROTECTED]

[android-developers] Re: Mouse Gesture for Navigation?

2008-09-22 Thread kingtut
Any luck in getting the onFling or onScroll event to fire? I am facing the same problem. On Sep 12, 5:14 pm, Mark Hansen [EMAIL PROTECTED] wrote: Ok, I'll keep trying it.. for some reason the events aren't firing such as Fling etc. On Sep 12, 10:12 am, Kavi [EMAIL PROTECTED] wrote:

[android-developers] Re: Mouse Gesture for Navigation?

2008-09-12 Thread Kavi
ListView is a kind of View, so you should be able to attach the GestureDetector to your ListView as well. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to

[android-developers] Re: Mouse Gesture for Navigation?

2008-09-12 Thread Mark Hansen
Ok, I'll keep trying it.. for some reason the events aren't firing such as Fling etc. On Sep 12, 10:12 am, Kavi [EMAIL PROTECTED] wrote: ListView is a kind of View, so you should be able to attach the GestureDetector to your ListView as well.

[android-developers] Re: Mouse Gesture for Navigation?

2008-09-11 Thread Kavi
You can use the android.view.GestureDetector to detect gestures on a view. First, you can implement the GestureListener interface. Second, you can create an instance of gesturedetector for your activity, and in your activity's onTouch method, call the gesture detector's instance's onTouchEvent

[android-developers] Re: Mouse Gesture for Navigation?

2008-09-11 Thread Mark Hansen
Can this be implemented on a ListView? I've got a listview that takes up the whole screen, so I'd like to be able to detect this on the ListView itself. Thanks for the insight though, looks straight forward on a regular view. On Sep 11, 3:25 pm, Kavi [EMAIL PROTECTED] wrote: You can use the