我是第一个activity跳转到第二个activity(继承 ActionBarActivity )时候,在oncreate方法中
有 protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
actionBar=getSupportActionBar();
setContentView(R.layout.security_home);
Boolean isUpdate=getIntent().getBooleanExtra("isUpdate", false);
Toast.makeText(getApplicationContext(), "拿到check的值了: "+isUpdate.toString(),
Toast.LENGTH_LONG).show();
UpdateManagerUtil um= new UpdateManagerUtil(HomeActivity.this);
um.showDownloadDialog();
}
其中showDownloadDialog方法
public void showDownloadDialog()
{
// 构造软件下载对话框
AlertDialog.Builder builder = new Builder(mContext);
builder.setTitle("Test");
// 给下载对话框增加进度条
final LayoutInflater inflater = LayoutInflater.from(mContext);
View v = inflater.inflate(R.layout.update_dialog_progress, null);
mProgress = (ProgressBar) v.findViewById(R.id.update_progress);
//textView = (TextView)v.findViewById(R.id.textView01);
builder.setView(v);
// 取消更新
builder.setNegativeButton("Testquxiao", new OnClickListener()
{
@Override
public void onClick(DialogInterface dialog, int which)
{
dialog.dismiss();
// 设置取消状态
cancelUpdate = true;
}
});
mDownloadDialog = builder.create();
mDownloadDialog.setCancelable(false);
mDownloadDialog.show();
// 现在文件
downloadApk();
}
然后出现奇怪的问题是

如果是直接启动这个activity

然后我还发现如果
<ProgressBar
android:id="@+id/update_progress"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
style="?android:attr/progressBarStyleHorizontal" />
把进度条的style="?android:attr/progressBarStyleHorizontal"这句去掉或者换成其他style,actionbar不会被遮挡,求各路支招
------解决思路----------------------
应该是因为progress弹出了就相当于一层,最下面的就出问题了,不弹出progress 弹出dialog应该也会是一样的效果