Two RecyclerViews under each other in one layout

前端 未结 7 878
不知归路
不知归路 2020-12-13 18:21

How can I get two RecyclerViews under each other in one layout? I don\'t want to have a single RecyclerView for all items. My code:



        
7条回答
  •  遥遥无期
    2020-12-13 19:01

    if you get the bottom recyclerview not scrolling with the main content, change the LinearLayout (see answer from alan_derua) to ConstraintLayout and wrap the two RecyclerViews inside. See code below:

    
    
    
    
        
    
        
    
        
    
    
    
    

    This worked for me!

提交回复
热议问题