android-pagedlistview

How to update a single item in a PagedListAdapter

时间秒杀一切 提交于 2020-05-15 10:11:06
问题 I've implemented the new PagedListAdapter with an ItemKeyedDataSource. My list contains feed items with a like button. A click on the like button should refresh the item. To refresh my list item on a like button click, i update the state in my Firestore back-end, and call invalidate on my ItemKeyedDataSource. But this will refresh my whole list while jumping back to the top of my list. I wasn't sure if this is normal behaviour, so i went debugging and checking maiby my DiffUtil.ItemCallback

How to update a single item in a PagedListAdapter

与世无争的帅哥 提交于 2020-05-15 10:11:03
问题 I've implemented the new PagedListAdapter with an ItemKeyedDataSource. My list contains feed items with a like button. A click on the like button should refresh the item. To refresh my list item on a like button click, i update the state in my Firestore back-end, and call invalidate on my ItemKeyedDataSource. But this will refresh my whole list while jumping back to the top of my list. I wasn't sure if this is normal behaviour, so i went debugging and checking maiby my DiffUtil.ItemCallback

How to update a single item in a PagedListAdapter

亡梦爱人 提交于 2020-05-15 10:10:08
问题 I've implemented the new PagedListAdapter with an ItemKeyedDataSource. My list contains feed items with a like button. A click on the like button should refresh the item. To refresh my list item on a like button click, i update the state in my Firestore back-end, and call invalidate on my ItemKeyedDataSource. But this will refresh my whole list while jumping back to the top of my list. I wasn't sure if this is normal behaviour, so i went debugging and checking maiby my DiffUtil.ItemCallback