标题栏添加延时加载标志

引用:http://www.oschina.net/code/snippet_163910_6093

[图片] 1.jpg

[代码] [Java]代码

1 requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
2         setContentView(R.layout.main);
3         setProgressBarIndeterminateVisibility(true);
---------------------------------------------------------

[代码] [Java]代码

1 protected void onCreate(Bundle savedInstanceState) {
2     super.onCreate(savedInstanceState);
3     requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);//先给Activity注册界面进度条功能
4     setContentView(R.layout.main);
5     setProgressBarIndeterminateVisibility(true);//在需要显示进度条的时候调用这个方法
6     setProgressBarIndeterminateVisibility(false);//在不需要显示进度条的时候调用这个方法
7 }

[图片] device.png

posted @ 2011-09-23 17:26  镇水古月  阅读(191)  评论(0编辑  收藏  举报