183 questions
2
votes
0
answers
412
views
Recycler view does not update until scrolled when using DiffUtil and submitList() with a reversed Array List
I have an array list of log entries, which consists of an a time and date with a description. I want the user to be able to reverse the direction from oldest to newest and back again.
I am using ...
1
vote
1
answer
133
views
DiffUtil in RecyclerView Adapter does not display all items when inserting more than one consecutively
I'm using a RecyclerView along with DiffUtil to manage changes in the data list. The issue I'm facing is that when attempting to insert multiple items consecutively into my adapter using ...
0
votes
1
answer
95
views
Unable to update recycler view using live data, room database, diff utils, mvvm architecture
I am trying to update recycler view after clearing room database. On click of clear button in pop up menu data from room database is cleared up recycler view is not updated.
Error can be seen
Error ...
1
vote
0
answers
50
views
Recyclerview is scrolled up when dispatchUpdatesTo is called
Recyclerview is scrolled to its top when dispatchUpdatesTo method is called after calculating Diffutil difference, even after state is stored.
Tried saving state and restoring, but not working.
Tried ...
0
votes
1
answer
86
views
Diff util not updating items in recycler
I have problems updating data into recycler view. Im using adapter with diffutil
class DiffUtilCallback : DiffUtil.ItemCallback<SectorItemDataUI>() {
override fun areItemsTheSame(oldItem: ...
0
votes
1
answer
81
views
None of the following functions can be called with the arguments supplied - AsyncListDiffer
I was creating a RecyclerView adapter. but then I got AsyncListDiffer issue.
None of the following functions can be called with the arguments supplied - AsyncListDiffer
how to fix it ?
NoteAdapter.kt
...
1
vote
1
answer
153
views
ListAdapter: Item click listener not re-binded after submitList
I have a problem with ListAdapter despite that it is probably working as intended is becoming a bug on my end.
Let say I have this data class
data class AssetMinDataDomain(
val id: String = "&...
0
votes
0
answers
98
views
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(
...
0
votes
0
answers
302
views
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 ...
0
votes
1
answer
117
views
dataSetChanged in List Adapter displays scrollbars in Recycler View each time
I have Recycler View (inside SwipeRefreshLayout) with vertical scrollbar with custom thumb color:
<androidx.swiperefreshlayout.widget.SwipeRefreshLayout
android:id="@+id/...
0
votes
0
answers
171
views
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 ...
1
vote
1
answer
574
views
DiffUtil (dispatchUpdatesTo) not updating Recycler View
I am implementing a recycler view with diff util, but the first time I send the list to the adapter, the recycler view is not notified about the new list. Only the second time I update the list does ...
1
vote
3
answers
264
views
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.
...
0
votes
1
answer
350
views
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: `...
0
votes
1
answer
1k
views
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 ...
0
votes
1
answer
222
views
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<Uri>.
Can I use a LinkedHashSet ...
0
votes
1
answer
277
views
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(...
0
votes
1
answer
763
views
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 ...
0
votes
1
answer
886
views
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 ...
1
vote
2
answers
413
views
Remove AsyncListDiffer list and update it after click close search (submit null not working)
In this app I am using AsyncListDiffer I have a toolbar with searchBar and a search icon I am trying to remove the old search list when the user clicks on close search and make a new call request then ...
1
vote
1
answer
655
views
How to insert different item e.g. native ads on each 10 items of recyclerView using diffutil "AsyncListDiffer"
Since I decided to migrate from setting items and notifyDataSetChanged() to using AsyncListDiffer SubmitList method I am facing problems with implementing native ads to RecyclerView in my current ...
0
votes
1
answer
617
views
Renaming item with DiffUtil not updating RecyclerView
For an app I am making I have a list in which I display pixel art creations, I do this with a RecyclerView and DiffUtil, here is the code:
package com.therealbluepandabear.pixapencil.adapters
import ...
0
votes
1
answer
801
views
Change specific items in List when using DiffUtil
In case,
When there is a list with 100 items and wanna change only some of them, should I need to create a new list for comparison with DiffUtil?
fun fetchDynamicItems() {
val items = repository....
0
votes
1
answer
863
views
Kotlin Recyclerview change item color onClick
i have a Recyclerview adapter in Kotlin and when i click it change the color to Red but if i click another item, the previous item still have the Red color. How to make the logic when the item click ...
0
votes
1
answer
104
views
Recyclerview move to penultimate position when the list is update
Currently i have the next config.
RecyclerView + MutableLiveData + DiffUtils
The behavior is:
When i move to the last position and update the list, the RecyclerView move automatically to penultimate ...
2
votes
2
answers
281
views
RecyclerView inside WindowManager does not update
I try to create a notification overlay inside my application that can show notifications about certain application wise important events.
I decided to use a RecyclerView which will be drown directly ...
0
votes
1
answer
175
views
need to use DiffUtill facilities in recyclerView Kotlin
Employee class:
data class Employee(
val id: Long,
val fullName: String,
val city: String,
var isLiked: Boolean = false,
) {
companion object {
...
3
votes
1
answer
9k
views
Jetpack Compose Lazy Column insertion and deletion animations with multiple item types [duplicate]
What's the best way to animate insertion and deletion animations in lazy column or row with multiple item types similar to how it's done using DiffUtil?
0
votes
1
answer
1k
views
DiffUtil.Callback getChangePayload oldItem is same as newItem
I have a DiffUtil.Callback that compares 2 lists of model StorageModelUi.
sealed class StorageModelUi {
class ServerItem(val server: Server): StorageModelUi()
class StorageContent(val used: ...
2
votes
1
answer
889
views
Android Paging3 not receiving error state
I'm using paging3. My RemoteMediator returns Result.Error from catch:
catch (e: Exception) {
return MediatorResult.Error(handler.getError(e))
}
Inside fragment I'm listening for ...
0
votes
1
answer
482
views
Multiple RecyclerView(two) has lag - android
I have a list that load in RecyclerView with CardView and in CardView I have a RecyclerView that have (max) 10 items, I load it now, but it has lag:
My First LessonContentListAdapter.kt:
class ...
1
vote
2
answers
1k
views
Android. How to detect when ui was updated after submit list in recycler view?
I have implemented search contacts applications. Contact list may be very large. For implementation I used kotlin flow, RecyclerView and AsyncListDiffer. Initially, I used diff util, but after that I ...
11
votes
2
answers
7k
views
why use areItemsTheSame with areContentsTheSame at diffutil recyclerview?
why need to use areItemsTheSame with areContentsTheSame at diffutil recyclerview?
i don't understand i think areItemsTheSame is enough to compare data?
is possible more explain to me?
thank you
2
votes
0
answers
1k
views
Viewpager2 with fragment and diffutil problem
I have a problem with viewpager2.
Problem is
There is a viewpager2 with Fragment, FragmentStateAdapter, DiffUtil
If page is selected, update fragment list dynamically. (remove, add)
Here is a example....
0
votes
1
answer
1k
views
Problems with DiffUtil. It works slowly and sometimes incorrectly
I started learning DiffIUtil and met some problems. I want to write a simple android app with a seachview and a recyclerview what use DiffUtil, but the recycler sometimes shows uncorrect data despite ...
0
votes
1
answer
1k
views
ListAdapter currentList and itemCount not returning updates after filter or submitList
I am implementing filterable list for RecyclerView using ListAdapter with AsyncDifferConfig.Builder that implements Filterable. When searching and no result match, a TextView will be shown.
adapter....
1
vote
0
answers
436
views
RecyclerView ListAdapter with Header View
It seems ListAdapter with AsyncDifferConfig and DiffUtil does not work properly when a RecyclerView has header itemview implemetation, the list always start to display items at bottom upon calling ...
0
votes
2
answers
495
views
How can DiffUtil know about list changes when only the companion object has changed?
As shown in the image, I would like the unit of the Detail item to be changed at once according to the toggle button.
Detail list items were set as companion objects because it was determined that it ...
0
votes
1
answer
2k
views
diffutil callback in recyclerView doesn't work perfectly
I'm trying to add some search on the RecyclerView list without using
notifyDataSetChanged()
instead to it using
diffutil.callback()
but the issue is that it change the list correctly but it doesn'...
5
votes
1
answer
8k
views
How to use DiffUtils In RecyclerViewAdapter on Android
In my application I want use RecyclerView adapter and for set data I used DiffUtils.
I Want search data from server and then show it into RecyclerView!
I write below codes, but after search data show ...
4
votes
4
answers
2k
views
ListAdapter DiffUtils newItem and oldItem the same when submitList() called
Just FYI, I'm not exactly looking for a 'fix' but for an explanation and a discussion that might help understand a little bit more how seemingly silly things like these work.
I was working on this ...
8
votes
2
answers
7k
views
List Adapter Diff Util not updating the List Item in Recyclerview
List Adapter diffutil not updating the list item in recyclerview.
It works when I add or remove a item from the list. But not updating the any particular value like isSelected : Boolean = false in ...
2
votes
1
answer
1k
views
How to handle changed items with ListAdapter and DiffUtil?
I am facing an issue where a change in an item is not reflected when using submitList in ListAdapter.
I know that below code works in case I want to remove an item when using ListAdapter as inside ...
3
votes
1
answer
921
views
DiffUtil clashes with ArrayIndexOutOfBoundsException when updating the recyclerview adapter list
I'm trying to update ViewPager2 adapter with a new list of items using DiffUtil but it keeps clashing now and then.
from the Fragment
private suspend fun updateMap(items: List<Item>) {
...
3
votes
1
answer
2k
views
Android DiffUtil in item-specific situations
I usually use diffutil with Recyclerview when needed. Right now I have situation where the items I get from backend look like this:
data class CarouselItem(var url: String, var pictureUrl: String, var ...
1
vote
1
answer
237
views
RecyclerView does not update the screen
I'm working on adding an item via a button.
I used ListAdapter and DiffUtil.
However, when the button is pressed, the first item is updated, but the screen does not update after that.
I tried ...
0
votes
1
answer
419
views
Diff util not updating UI - Multitype recyclerview - Model contains lists
I have a recyclerview which displays multiple viewholders containing horizontal rows, grids, vertical lists etc so my Model that I pass to the recyclerview has a few different lists contained in it.
...
4
votes
2
answers
2k
views
DiffUtil is changing my position when list is sortedByDescending
I am using diff util to improve performance in my recyclerview as opposed to calling notifyDataSetChanged(). The recyclerview has a header with some chips which can reorder the list by aplhabetical ...
0
votes
1
answer
431
views
How to implement DiffUtil for images
Hello there I'm heard about this library DiffUtil which improves the recycler view performance and hence my recycler view contains images it is will be better for me to implement it but I don't know-...
12
votes
1
answer
8k
views
ListAdapter submitList not updating
I have this issue with the pagination infinite scroll in RecyclerView, I am adding all new item using .addAll()
movieList.addAll(it.movieList)
adapter.submitList(movieList)
Log.wtf("WTF", ...