閱讀275 返回首頁    go 阿裏雲 go 技術社區[雲棲]


android中MotionEvent.ACTION_CANCEL事件如何被觸發?

對於這個問題,android文檔的說明很簡短,想看明白很難。國外一網頁說的還比較詳細,寫在這裏分享給大家:

原文是這樣的:

You receive this when a parent takes possession of the motion, for example when the user has dragged enough across a list view or scroll view that it will start scrolling instead of letting you press the buttons inside of it.  

意思是這樣的:

當你的手指(或者其它)移動屏幕的時候會觸發這個事件,比如當你的手指在屏幕上拖動一個listView或者一個ScrollView而不是去按上麵的按鈕時會觸發這個事件。

最後更新:2017-04-02 16:48:06

  上一篇:go onInterceptTouchEvent和onTouchEvent調用時序
  下一篇:go android: 靜態XML和動態加載XML混合使用,以及重寫Layout控件