views:

662

answers:

1

Hi,

I'm relatively new to Android development. I'm developing an app with a ListView. I've followed the info in #1338475 and have my app recognizing the fling gesture, but after the gesture is complete, it pulls up the context menu for the item. I just want the fling action to be handled in code (my app does one list per date and I want to use the fling gesture to move back and forth in days). Does anyone know how to suppress the context menu if the gesture is recognized?

Thanks, Jason

A: 

Check the return value in your overrided onFling method.

You need to return "true" in order to consume the event, if you do not consume the fling event, it will be passed back up through the android system and possibly trigger other events such as the onLong (context menu) event.

Duane
Thanks. It turned out to be two problems:1) I didn't return True.2) I was using the emulator, which is apparently a bit sluggish on my box.
Jason Antman