Reputation: 105
I'm facing problems in scrolling. I've the following structure in order in my project:
1) ViewPager 2) RecyclerView 3) ExpandableListView
I cannot scroll the ExpandableListView; but I can scroll RecyclerView. I tried setNestedScrolling but i didn't work.
Any solutions?
Upvotes: 3
Views: 906
Reputation: 2122
I think what you need to do is disable the scroll of the parent when you touch the child. So this should work
mListView.setOnTouchListener(new View.OnTouchListener() {
@Override
public boolean onTouch(View v, MotionEvent event) {
//Disallow the touch request for parent scroll on touch of child view
v.getParent().requestDisallowInterceptTouchEvent(true);
return false;
}
});
Upvotes: 3