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