Questions tagged [android-asynclistdiffer]
9 questions
6
votes
3 answers
RecyclerView scroll to top with AsyncListDiffer not working
I am using RecyclerView with AsyncListDiffer (calculates and animates differences between old and new items, all on background thread).
I have a button to sort the list. After I sort it and re-set it to RecyclerView using mDiffer.submitList(items);…
Primož Kralj
- 5,534
- 14
- 65
- 125
4
votes
1 answer
AsyncListDiffer is not updating the recyclerview
I have a RecyclerView with an adapter that uses AssyncListDiffer. The problem I have is that the recyclerview is not updated when changes happen in the LiveData. The observer is notified but the list doesn't update.
This is my adapter:
class…
Gabriel Kuka
- 164
- 1
- 11
4
votes
2 answers
AsyncListDiffer onAfterSubmitList Listener
I'm trying to call recyclerView.getLayoutManager().smoothScrollToPosition(recyclerView,null,0) only after mDiffer.submitlist(list) is finished "diffing" and animating the list updates/changes.
Is there an AsyncListDiffer feature for…
aLL
- 952
- 10
- 23
1
vote
0 answers
diffutil areContentsTheSame function compares only new items
I am using AsyncListDiffer in my project, in which i have lots of quotes in main page
Below is the code i've written in my recyclerview adapter
private val diffCallback = object : DiffUtil.ItemCallback
() { override fun…
nesibeyyubov
- 166
- 10
0
votes
0 answers
RecyclerView AsyncListDiffer and data source consistency state lose with onClickListener
I have data source(in that example it's just a var myState: List)
class MainActivity : AppCompatActivity() {
var generation: Int = 0
var myState: List = emptyList()
val userAdapter = UserAdapter {
val index =…
Arkaha
- 1,503
- 3
- 17
- 18
0
votes
0 answers
Why does submitList method of Diffutil AsyncListDiffer not refresh my recyclerview?
I am implementing recyclerview inside recyclerview as shown in below image and using diffutil asynclistdiffer to manage the changes in list elements.
List of event cards
Adding code of fragment and adapters below.
CustomizeEventFragment code:
class…
nilesh mali
- 1
- 1
- 2
0
votes
2 answers
Update RecyclerView with DiffUtil and AsyncListDiffer not Working
I'm creating a RecyclerView in Fragmentusing DiffUtil and AsyncListDiffer because I don't want to use notifyDataSetChanged() method. But I'm facing a problem while using this approach. I'm trying to retrieve items from the database, but every time…
Proxcentaur
- 42
- 6
0
votes
1 answer
ListAdapter does not fill the adapter on 2nd fragment of application
I have an application with 2 fragments, both have lists that are being filled from the same adapter.
The first one works correctly, but the second one -
class CountryBordersFragment : Fragment(R.layout.fragment_country_borders) {
private…
Alon Shlider
- 790
- 7
- 25
0
votes
1 answer
Submit the same list using AsyncListDiffer, but the recycler view always auto scroll to top
I try to submit the same list using AsyncListDiffer, but the recycler view always auto scroll to top. When I debug I see the recyclerview auto scroll to top after calling submitList before areItemsTheSame method is called
class TestPlaceAdapter(
…
Hien Nguyen
- 702
- 2
- 7
- 15