How do I make WRAP_CONTENT work on a RecyclerView

后端 未结 19 1831
自闭症患者
自闭症患者 2020-11-22 12:49

I have a DialogFragment that contains a RecyclerView (a list of cards).

Within this RecyclerView are one or more CardVi

19条回答
  •  春和景丽
    2020-11-22 13:45

    i suggest you to put the recyclerview in any other layout (Relative layout is preferable). Then change recyclerview's height/width as match parent to that layout and set the parent layout's height/width as wrap content. it works for me

提交回复
热议问题