Skip to content

Commit 5a6b2b4

Browse files
committed
fix(progress): prevent error on indeterminate change
1 parent d4275fb commit 5a6b2b4

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/progress/progress.android.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,13 @@ export class Progress extends ProgressBase {
2222
this.nativeViewProtected.setProgressBackgroundTintList(color ? android.content.res.ColorStateList.valueOf(color.android) : null);
2323
}
2424
[indeterminateProperty.setNative](value: boolean) {
25-
this.nativeViewProtected.setIndeterminate(value);
25+
if (this.nativeViewProtected.getVisibility() === android.view.View.VISIBLE) {
26+
this.nativeViewProtected.setVisibility(android.view.View.GONE);
27+
this.nativeViewProtected.setIndeterminate(value);
28+
this.nativeViewProtected.setVisibility(android.view.View.VISIBLE);
29+
} else {
30+
this.nativeViewProtected.setIndeterminate(value);
31+
}
2632
}
2733
[busyProperty.getDefault]() {
2834
return false;

0 commit comments

Comments
 (0)