2013-07-11 16 views

回答

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 
} 
+0

這就是我實際上做了什麼......但感謝幫助反正:) – loudev