可以使用以下方法设置不确定进度条的可见性:
setSupportProgressBarIndeterminateVisibility(true / false);
但是如何检查进度条的可见性? 一种" getSupportProgressBarIndeterminateVisibility()" ?
感谢。
答案 0 :(得分:2)
据我所知,截至目前还不存在类似“getSupportProgressBarIndeterminateVisibility()”的内容。所以,
您可以使用旗帜来实现目标。
例如:
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
}