getHistorySize() returns 0 even on MotionEvent.ACTION_MOVE events
I kept getting 0 from event.getHistorySize() even when the event is MotionEvent.ACTION_MOVE.
Howeve开发者_如何学Pythonr, it's not always zero. It adds one point count in like 10 ACTION_MOVE events. Can anyone please help?
I am not sure about this, but I have been troubled by the same problem. What I believe is that the MotionEvent history contains the events which have not been reported individually to the onTouchEvent. This is also supported by the Android Documentation (http://developer.android.com/reference/android/view/MotionEvent.html) under "Batching".
The HistorySize is the list of MotionEvents it's missed. So when it drops frames. It'll give you all the ones it missed, if it's important. It doesn't store all the events that it gave you previously. It only stores those events it doesn't.
精彩评论