Description: If I have a ProgressIndicator in a RecyclerView, and the ViewHolder's View gets detached from the window, when it gets reattached, the ProgressIndicator is invisible.
Expected behavior: It remains visible
Android API version: 29
Material Library version: 1.3.0-alpha02
Device: Pixel 2
This seems similar to my issue: https://github.com/material-components/material-components-android/issues/1681
Did you find any workaround? I have the same problem...
In version 1.3.0-alpha01 works fine
I can confirm that it works fine in version 1.3.0-alpha01.
To solve this issue in version 1.3.0-alpha02, I've overridden the following method in my RecyclerView.Adapter:
override fun onViewAttachedToWindow(holder: RecyclerView.ViewHolder) {
holder.itemView.progressIndicator.visibility = View.VISIBLE
}
Looking into this more, this issue also happens if you have 2 recycler views inside 2 tabs under a Tablayout.
When you switch between the tabs, the progress bar disappears after the switch.
Bump. This bug is almost making the ProgressIndicator unusable in a recyclerview..
The issue still exists in version 1.3.0-alpha04.
Obsolete, as ProgressIndicator has been divided into LinearProgressIndicator and CircularProgressIndicator. Similar bugs are reported and fixed in #1914 and #1902.
Most helpful comment
Bump. This bug is almost making the ProgressIndicator unusable in a recyclerview..