android notifyItemRangeInserted disable autoscroll

后端 未结 1 1681
青春惊慌失措
青春惊慌失措 2020-12-29 06:03

I\'m using RecyclerView as the base for my data list. i\'ve implemented custom RecyclerView.Adapter which is based on ArraList. on fetching data from the internet the code t

相关标签:
1条回答
  • 2020-12-29 06:12

    Problem is in your positionStart. Should be:

    public void addItems(List<QuestItem> items){    
        final int positionStart = data.size() + 1;
        data.addAll(items);
        notifyItemRangeInserted(positionStart, items.size());
    }
    
    0 讨论(0)
提交回复
热议问题