views:

11

answers:

1

In fact, only the touch_down event will fire. Basically, I'm trying to implement a drag feature in my app so I need the touch_move event. I have a method that writes out the touch events to the LogCat in Eclipse but the touch_down is the only event that shows up. not even touch_up shows up. I have this problem when I debug on the device or in the avd.

This isn't really a code question. But has anyone had an issue getting different touch events to fire? If so, how did you resolve them? I'm using the latest Android SDK and Eclipse version. I'm using a simple ImageView.

Any ideas?

A: 

So while handling TouchEvent you need to be careful.The important thing is that this event can have multiple actions that follow each other. So, if you return false when the down action event is received, you indicate that you have not consumed the event and are also not interested in subsequent actions from this event. Thus, you will not be called for any other actions within the event, such as a finger gesture, or the eventual up action event. For further information read the documentation.

bhups
Oops, I was returning false. Must've overlooked that. Thanks.
CYAD