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

前端 未结 6 578
一整个雨季
一整个雨季 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:17

    try

    public OuterRecyclerViewAdapter(List items) {
        //Constructor stuff
        viewPool = new RecyclerView.RecycledViewPool();
    }
    @Override
    public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        //Create viewHolder etc
        holder.innerRecyclerView.setRecycledViewPool(viewPool);
    
    }
    

    inner recylerview will use the same viewpool and it'll be smoother

提交回复
热议问题