Chrisの梳羽之礁

A look of quick intelligence and soft refinement
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

ActionBar点滴

Posted on 2012-06-27 13:54  Chrisfang6  阅读(239)  评论(0编辑  收藏  举报

 

 

1. 在ActionBar上加ProgressBar

// This has to be called before setContentView and you must use the  
// class in android.support.v4.view and NOT android.view
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS); 

 

To show/hide progress in action bar. Notice with actionbarsherlock you must use boolean.TRUE/FALSE, not just true/false...

if (getSupportLoaderManager().hasRunning Loaders()) {
    setProgressBarIndeterminateVisibility(Boolean.TRUE); 
} else {  
    setProgressBarIndeterminateVisibility(Boolean.FALSE); 
}

 

2. 自定义ActionBar