标签:
怎样在标题栏中显示进度条
import android.app.Activity;
import android.os.Bundle;
import android.view.Window;
public class MainActivity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
//调用窗口有特征,启用标题栏中的进度条
requestWindowFeature(Window.FEATURE_PROGRESS); //显示进度的进度条
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);//不显示进度的模糊进度条
setContentView(R.layout.activity_main);
setProgress(500);//设置进度条的进度
setProgressBarIndeterminateVisibility(true);//设置模糊进度条是否可见
}
}
标签:
原文地址:http://www.cnblogs.com/xujinghuan/p/5432675.html