Questions tagged [android-diffutils]

Questions related to Android DiffUtil utility class for calculating difference between two lists

180 questions
1
vote
2 answers

RecyclerView with DiffUtil (ListAdapter) blocks UI thread

I am using a RecyclerView with ListAdapter (which uses AsyncListDiffer to calculate and animate changes when list is replaced). The problem is that sometimes when I call submit() to update the RecyclerView with new data, it blocks the whole UI…
0
votes
0 answers

Recyclerview Listadapter - updating visibile items in realtime

I am facing following problem: Having this entity to show a list of channels with each its current and next program in a recyclerview (ListAdapter with Diffutil): data class TvChannelsWithEpgData( val tvChannels: TvChannels, var epgDataList:…
0
votes
0 answers

RecyclerView Delete on swipe deletes element but not the hole in the list stays

I'm working on simple notes app and struggling with recyclerview and note deletion. I use DiffUtil and the problem is when I delete the note, it disappears, but the rest of the elements do not pull up, taking up an empty space. It happens only if…
splekhanov
  • 116
  • 1
  • 2
  • 9
0
votes
0 answers

How display correctly different list with same items with DiffUtil in kotlin?

it's my first post in stack overflow, sorry in advance if my message has charter faults. I've problem using DiffUtil in my project, i hope you can help me. I explain: I build an app who manage different students class. I have fragment who display a…
Etheys
  • 1
0
votes
0 answers

Updated to DiffUtil but getting null response in DiffResult used volley for data as json

your textUpdated working recyclerview to diffUtil which gets data in the form of json fro google sheet after initializing the diffUtil in adaper created method which shows invoke virtual method getting null from diffresult MAIN ` …
0
votes
1 answer

dataSetChanged in List Adapter displays scrollbars in Recycler View each time

I have Recycler View (inside SwipeRefreshLayout) with vertical scrollbar with custom thumb color:
0
votes
0 answers

AndroidTv Leanback Correct way of updating rows and headers

In light of this article on medium Which works perfectly fine when using PageRows in a BrowseSupportFragment. Things get ugly when ListRow is used instead of PageRows and the whole list and headers start to blink on every data update/set and the…
Rez
  • 4,501
  • 1
  • 30
  • 27
0
votes
3 answers

how to update the data in specific position in the recyclerview without notifying the whole item? (Ex. text, image etc)

I need the functionality to update the data in the item in the recycler view. right now, If we notify the whole item it shows some fluctuation and we want to avoid refreshing the whole item on the UI. I am using the ListAdapter with diff utils.
0
votes
1 answer

If data in a recycler view item is null then don't display the view holder

I have an API which give me the list of doctors. On it's last page only 1 item is there and other items are null like this: After this i have used paging library for pagination my pagingSource code: ` class DocPagingSource(val docRepository:…
0
votes
1 answer

Android Leanback: How to update nested rows item in RowsSupportFragment

Hey Guys I'm working on androidTV application using leanback library. I should show list of categories that each category has it's own list of contents. For this approach leanback offered RowsSupportFragment that you can show this type of UI inside…
Hamid Reza
  • 624
  • 7
  • 23
0
votes
1 answer

Is it possible to use DIffUtil/AsyncListDiffer with other Collection than List?

I'm currently using DiffUtil/AsyncListDiffer with a List collection. I'm using the general adapter/recyclerview/ViewHolder implementation. Items are a List. Can I use a LinkedHashSet instead of a List? Also, if yes, is it a major change?
0
votes
1 answer

Diffutils: Can add new data but always returns true in areContentsTheSame() when updating an item

in my UI layer val toMutableList = mAdapter.currentList.toMutableList() // update data at position 5 val deviceItem = toMutableList[5] deviceItem.deviceEntity.onLineRefresh = false mAdapter.submitList(toMutableList) In my DiffUtil.ItemCallback…
zeng li
  • 3
  • 1
0
votes
1 answer

Retrofit responses keep the old data and add the new one to that for editText search

I am getting data from an API with editText search. At first search it works as expected but on second and so on, it will not show the only new response, instead it keeps old one and adds new one to end of it. It acts like it's caching previous…
Mert
  • 904
  • 4
  • 9
  • 21
0
votes
1 answer

Observing live data from an API is not updating ui when data changes

I am trying to develop a football app demo. Data comes from an API from the api It loads data as expected when app started, but when score of match changes, ui is not updating for scores by itself. I am using DiffUtil getChangePayload() to detect…
0
votes
0 answers

Viewpager2 is overlapping adapter view

I created a ViewPager2 view with a DiffUtil adapter, that is updated when I get data from several APIs. However, the problem is that the views overlap when I update the adapter. As you can see in this video. Click to view the video on Vimeo …