How to use RecyclerView inside NestedScrollView?

前端 未结 24 2823
抹茶落季
抹茶落季 2020-11-22 03:39

How to use RecyclerView inside NestedScrollView? RecyclerView content is not visible after setting adapter.

UPDATE

24条回答
  •  闹比i
    闹比i (楼主)
    2020-11-22 04:42

    One solution to keep the recycling feature of the recyclerview and avoiding the recyclerview to load all your data is setting a fix height in the recyclerview itself. By doing this the recyclerview is limited only to load as much as its height can show the user thus recycling its element if ever you scroll to the bottom/top.

提交回复
热议问题