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