Android: how can I insert a RecyclerView inside CardView?

前端 未结 2 1255
野的像风
野的像风 2020-12-25 08:20

The activity I am talking about must show a RecyclerView populated by CardViews as items. My goal is to show in every CardView a RecyclerView in its turn.<

2条回答
  •  粉色の甜心
    2020-12-25 09:03

    As of support library 23.2, the LayoutManager API brings auto-measurement which allows a RecyclerView to size itself based on the size of its contents. This means that using WRAP_CONTENT for a dimension of the RecyclerView, are now possible. You’ll find all built in LayoutManagers now support auto-measurement.

    Source

提交回复
热议问题