match_parent width does not work in RecyclerView

后端 未结 10 1437
深忆病人
深忆病人 2020-11-27 13:25

My RecyclerView and item has match_parent width but the result is : \"enter

           


        
10条回答
  •  悲&欢浪女
    2020-11-27 13:34

    In my case, the problem was in RecyclerView XML declaration, the layout_width was 0dp which means match_constraints, when I changed it to match_parent, items started to fill all RecyclerView width:

    
    

提交回复
热议问题