https://kotlinlang.org logo
d

Deepti M

07/31/2020, 8:47 PM
Hi Guys, Is there any listener for finding the recycler-view state when data is rendered, or something like that? Please let me know. Thanks!
👋 2
stackoverflow 1
o

okarm

07/31/2020, 10:12 PM
I don't understand what information you want, but the
RecyclerView.Adapter
has a few utility signalling methods. It sounds to me like you are looking for
Adapter.onViewAttachedToWindow
https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView.Adapter#onviewattachedtowindow From the documentation:
This can be used as a reasonable signal that the view is about to be seen by the user.
g

gildor

08/01/2020, 2:19 AM
Also you can just use onBindView? It's exact moment when view is updated, but view is not necessary visible
7 Views