我正在使用Jake的ActionBarSherlock和ViewPagerIndicator。 我意識到我無法在SherlockFragments中使用SherlockActivity設置setSupportProgressBarIndeterminate
。在SherlockFragments中使用SherlockActivity設置setSupportProgressBarIndeterminate
在SherlockActivity,我有
@Override
protected void onCreate(Bundle arg0) {
super.onCreate(arg0);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setTheme(R.style.Theme_Sherlock_Light_DarkActionBar);
ActionBar actionbar = getSupportActionBar();
actionbar.setDisplayHomeAsUpEnabled(true);
//setSupportProgressBarVisibility(true);
}
在我SherlockFragment的的AsyncTask
@Override
protected void onPreExecute() {
getSherlockActivity().getSupportActionBar();
getSherlockActivity().setSupportProgressBarVisibility(true);
getSherlockActivity().setSupportProgressBarIndeterminate(true);
}
的進度不會出現。有什麼理由呢?
在此先感謝。
檢查[顯示在Sherlock Action Bar中的不確定進度](http://stackoverflow.com/a/10615994) – 2013-04-25 14:13:49