Material-components-android: ProgressIndicator is invisible in RecyclerView

Created on 27 Aug 2020  路  8Comments  路  Source: material-components/material-components-android

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

bug

Most helpful comment

Bump. This bug is almost making the ProgressIndicator unusable in a recyclerview..

All 8 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrCreeper1008 picture MrCreeper1008  路  3Comments

sepehr-alipour picture sepehr-alipour  路  3Comments

mnayef95 picture mnayef95  路  3Comments

magnusfernandes picture magnusfernandes  路  3Comments

zkovar picture zkovar  路  3Comments