12
如何在活动标题栏中显示加载图标?在活动标题栏中显示加载图标
如何在活动标题栏中显示加载图标?在活动标题栏中显示加载图标
@Override
public void onCreate(Bundle icicle) {
super.onCreate(icicle);
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.your_layout);
}
然后......在任何你想要的:
// then, you can do this to show the icon
setProgressBarIndeterminateVisibility(true);
//or to hide it
setProgressBarIndeterminateVisibility(false);
确保setContentView
前使用requestWindowFeature
。
太棒了!非常感谢你! ;-) – 2010-12-10 11:04:39
你的意思是标题栏中的ProgressBar不确定吗?或标题栏中的自定义图标? – Franco 2010-12-09 15:31:49