2

It's possible to set the visibility of the indeterminate progress bar with :

setSupportProgressBarIndeterminateVisibility(true / false);

But how do you check the visibility of the progress bar? A kind of "getSupportProgressBarIndeterminateVisibility()" ?

Thanks.

4

1 回答 1

2

As far as i know, something like "getSupportProgressBarIndeterminateVisibility()" doesn't exist as of now. so,

you could possibly use a flag to achieve the objective.

for example:

Boolean isProgressBarVisible = false;
...   
//some code
setSupportProgressBarIndeterminateVisibility(true);
isProgressBarVisible = true;

//and when you set its visibility to false,
setSupportProgressBarIndeterminateVisibility(false);
isProgressBarVisible = false;

//And in your code where u need to perform a check,

if(isProgressBarVisible){

     //do stuff
} 
于 2013-07-11T09:53:29.940 回答