File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
lib/java/com/google/android/material/progressindicator Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -350,7 +350,7 @@ protected void onAttachedToWindow() {
350350 protected void onDetachedFromWindow () {
351351 // Removes the delayedHide runnable from the queue if it has been scheduled.
352352 removeCallbacks (delayedHide );
353- getCurrentDrawable ().setVisible ( /*visible=*/ false , /*restart=*/ false );
353+ getCurrentDrawable ().hideNow ( );
354354 unregisterAnimationCallbacks ();
355355 super .onDetachedFromWindow ();
356356 }
@@ -1005,9 +1005,9 @@ public void onAnimationEnd(Drawable drawable) {
10051005 @ Override
10061006 public void onAnimationEnd (Drawable drawable ) {
10071007 super .onAnimationEnd (drawable );
1008- if (!isIndeterminateModeChangeRequested ) {
1008+ if (!isIndeterminateModeChangeRequested && visibleToUser () ) {
10091009 // Don't hide the component if under transition from indeterminate mode to
1010- // determinate mode.
1010+ // determinate mode or the component is current not visible to users .
10111011 setVisibility (INVISIBLE );
10121012 }
10131013 }
You can’t perform that action at this time.
0 commit comments