2010-09-30 19 views
0

事實上,只有touch_down事件纔會觸發。基本上,我試圖在我的應用程序中實現拖動功能,所以我需要touch_move事件。我有一個方法可以將觸摸事件寫入Eclipse中的LogCat,但touch_down是唯一顯示的事件。不出現touch_up。我在設備或avd中進行調試時出現此問題。Android TOUCH_MOVE事件在avd或設備中未觸發

這不是一個真正的代碼問題。但是有沒有人有過觸及不同觸碰事件的問題?如果是這樣,你是如何解決它們的?我正在使用最新的Android SDK和Eclipse版本。我正在使用一個簡單的ImageView。

任何想法?

回答

2

因此,在處理TouchEvent時,您需要小心。 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.欲瞭解更多信息,請閱讀documentation

+0

糟糕,我返回false。一定忽略了這一點。謝謝。 – CYAD 2010-09-30 12:44:44