Sliding conflict processing of HorizontalListView and ViewPager in Android

label Android DevelopmentListview
460 people read comment(0) Collection report
Android development, there are a lot of controls have to click or slide conflict events, such as the onItemClick of the item event and Button on the ListView (if there is Button), etc.. Today at work with viewpager page apply HorizontalListView, transverse paddling also have conflict, the solution is simple, as long as in the HorizontalListView rewriting onInterceptTouchEvent (MotionEvent Add ev (true) method to add.RequestDisallowInterceptTouchEvent () getParent (), such a sentence on it.

Boolean onInterceptTouchEvent public (EV MotionEvent) {
GetParent ().RequestDisallowInterceptTouchEvent (true);
MGesture.onTouchEvent return (EV);
step on
Guess you're looking for
View comments
* the above user comments only represent their personal views, does not represent the views or position of the CSDN website
    personal data
    • visit47837 times
    • Integral:Two thousand two hundred and twenty-one
    • Grade
    • Rank:10236th name
    • original180
    • Reproduced:37
    • Translation:1
    • Comments:13
    Latest comments