Two RecyclerViews under each other in one layout

前端 未结 7 884
不知归路
不知归路 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:08

    You can give each RecycleView height equal to 0dp and weight equal 1:

    android:layout_height="0dp"
    android:layout_width="match_parent"
    android:layout_weight="1"
    

提交回复
热议问题