Skip to content

当RecyclerView中的item数量为0时,该如何更新? #1

@aloe20

Description

@aloe20

在onLayoutChildren方法中对item的数量为0时做了判断不处理if (getItemCount() <= 0 || state.isPreLayout()),在实际中,RecyclerView可能由有数据切换为无数据,此时调用notifyDataSetChanged无效,这个问题该如何解决呢?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions