我发现IllegalArgumentException: Called attach on a child which is not detached什么时候用它mFeedAdapter.notifyItemInserted(0)来改变数据,找到这个。
IllegalArgumentException: Called attach on a child which is not detached
mFeedAdapter.notifyItemInserted(0)
但解决方案是更改notifyItemInserted为notifyDataSetChanged. 我不想改变功能,因为我想保留动画。我能做什么 ?
notifyItemInserted
notifyDataSetChanged
android notifydatasetchanged android-recyclerview
android ×1
android-recyclerview ×1
notifydatasetchanged ×1