-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nested Child recycler view onCreate called every time during parent recycler view scroll. #236
Comments
@mdrafiwynk can you please share a sample that reproduces that issue? In the sample app, the views are being recycled correctly |
I have checked in profiler. In sample app, there is only one text view in item view but it will take lot of time to inflate. Also showing lot of janks whenever scrolling vertical in nested one |
@mdrafiwynk I just checked and found the problem in the sample app. I'm running some animations which are not cancelled in Will file a MR that fixes that, but if you're affected by this, it means you're also running animations you're not cancelling. Will link the fix MR here once it is open |
@mdrafiwynk have a look here: #237 |
Yes i am using nested horizontal RV item animation to scale In current focused item and scale out last focused item. Is I need to cancel it OnViewHolderDetachFromWindow? |
Is there any method in you library which called during scroll is idle. Like I am scale in currently focused and scale out last focused on focus listener of itemView. But if I scroll horizontal faster then it will show little scale in and out animation for micro second. I want to scale item only if scroll state is idle. How can i achieve this with your library? |
Yes, you do.
You can observe scroll state of or you can use the selection callback that has the aligned event: recyclerView.addOnViewHolderSelectedListener(object : OnViewHolderSelectedListener {
override fun onViewHolderSelectedAndAligned(
parent: RecyclerView,
child: RecyclerView.ViewHolder?,
position: Int,
subPosition: Int
) {
super.onViewHolderSelectedAndAligned(parent, child, position, subPosition)
// ViewHolder is in its final position
}
}) |
Thank you soo much. |
Closing since the sample now contains examples for canceling the animations |
I am working on tv app and using dpad recycler view. But I am getting huge performance issue in nested recycler view when scrolling vertically horizontal recycler view each item is created and its UI is inflated again.
I have check in library sample under nested option but facing same lagging and jank while vertical scrolling. Please check and fix it asap.
Feel free to contact any time.
The text was updated successfully, but these errors were encountered: