Setontouchlistener Why the override PerformClick warning appears
From the source can be seen, as long as the use of the View.setonclicklistener () method to set up the listener, it will automatically trigger View.performclick ().
It is important to note that if the View.setontouchlistener () method is used at the same time, there may be a response event that intercepts View.performclick () because when the view. Ontouchevent () returns false at event.getaction () = = Motionevent.action_down,
The system will assume that the view does not need to handle touch events, then the subsequent touch events (move, up, click) will not be passed in, so View.performclick () will not be triggered, and View.setontouchlistener () The equivalent is to rewrite the view. Ontouchevent (),
So when you write the Touchlistener processing of the view, you need to be aware of whether the view has a click event listener, and if so, use View.performclick () to trigger the Click event in the appropriate location.
Requestdisallowintercepttouchevent goodsetfocusable, setenabled, setclickable differences in the Android event handling mechanism
There are three states of scrollstate
Scrollstate has three states, starting with scrolling (scroll_state_fling), scrolling (Scroll_state_touch_scroll), Stopped (Scroll_state_idle)
"The Evolution of mankind" reading notes
"The Evolution of Mankind," the book Picks
my---a sad and happy year good Common Events for ListView: Click, Swipe
The difference between Android ontouchevent and Setontouchlistener in Ontouch
Setontouchlistener GoodAndroid event series-ontouch events and gesture actions good
Android Click, Touch Event