Android Layout: Horizontal Recyclerview inside a Vertical Recyclerview inside a Viewpager with Scroll Behaviors

前端 未结 6 574
一整个雨季
一整个雨季 2020-11-30 20:33

This is the app I\'m trying to build with all the elements mapped out below:

Everything works, however, I want the inner horizontal recyclerview not to capt

6条回答
  •  我在风中等你
    2020-11-30 21:03

    I am a bit late but this will defintly work for others facing the same problem

     mRecyclerView.addOnItemTouchListener(new RecyclerView.OnItemTouchListener() {
                @Override
                public boolean onInterceptTouchEvent(RecyclerView rv, MotionEvent e) {
                    int action = e.getAction();
                   // Toast.makeText(getActivity(),"HERE",Toast.LENGTH_SHORT).show();
                    switch (action) {
                        case MotionEvent.ACTION_POINTER_UP:
                            rv.getParent().requestDisallowInterceptTouchEvent(true);
    
                            break;
                    }
                    return false;
                }
    

提交回复
热议问题