Skip to content

Commit

Permalink
Use View.INVISIBLE instead of View.GONE to hide ActivityIndicator
Browse files Browse the repository at this point in the history
On Android, if the ActivityIndicator component is initially set to
animate={false}, it does not display if later set to true.

For some reason, the layout width/height of the associated ProgressBar
remains 0, despite the parent layout having the correct width/height.

I noticed that changing the visibility settings from View.GONE to
View.INVISIBLE didn't have an impact on the React Native layout, and
doing so appears to alleviate the issue.

Related to:
facebook#9023
  • Loading branch information
nhunzaker committed Jun 21, 2019
1 parent a225d1a commit 3bc4701
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public void apply() {
if (mAnimating) {
mProgressBar.setVisibility(View.VISIBLE);
} else {
mProgressBar.setVisibility(View.GONE);
mProgressBar.setVisibility(View.INVISIBLE);
}
}

Expand Down

0 comments on commit 3bc4701

Please sign in to comment.