RecyclerView inside NestedScrollView onBindViewHolder calling for all getItemCount size

后端 未结 4 1776
谎友^
谎友^ 2021-01-04 18:53

When I put RecyclerView inside NestedScrollView then onBindViewHolder is calling for all row like say I have list which has size of 30

4条回答
  •  北荒
    北荒 (楼主)
    2021-01-04 19:18

    It's right.Because you are using a ScrollView.ScrollView is not recyclable like RecyclerView or ListView.It will show all view contains these out of screen in one time.You should use a other layout instead.

提交回复
热议问题