我有一个listview,其中我在固定间隔后添加一些数据.但我不想再次设置适配器,因为它将刷新完整列表.是否有任何方法添加项目而不刷新完整列表.
提前致谢.
解决方法
您可能希望使用以下(在RecycleView而不是ListView中):
notifyItemInserted(0);//NOT notifyDataChanged() recyclerViewSource.scrollToPosition(0); //Scroll up,to use this you'll need an instance of the adapter's RecycleView