qq_39765977
VecPtr
采纳率0%
2017-08-11 02:57 阅读 2.1k

Android Progressdialog dismiss 后,触碰屏幕出现灰色遮罩层

请大家帮忙,Android Progressdialog dismiss 后,Progressdialog关闭 ,触碰屏幕出现灰色遮罩层,如progressdialog 的灰色背景,按下返回键后,恢复正常,
android stdio 下信息:

D/Surface: Surface::disconnect(this=0xb78fda70,api=1)

D/OpenGLRenderer: CanvasContext() 0xb75e5ff8 initialize 0xb75f2628 //
D/Surface: Surface::connect(this=0xb75f2620,api=1)
D/mali_winsys: new_window_surface returns 0x3000
D/Surface: Surface::allocateBuffers(this=0xb75f2620)
D/Surface: Surface::disconnect(this=0xb75f2620,api=1)

在Activity下代码:
private ProgressDialog mDialog;
private void showProgressDialog(){
if(mDialog==null){
mDialog = new ProgressDialog(this);
mDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);//设置风格为圆形进度条
mDialog.setMessage("正在加载 ,请等待...");
mDialog.setMax(100);
mDialog.setIndeterminate(false);//设置进度条是否为不明确
mDialog.setCancelable(true);//设置进度条是否可以按退回键取消
mDialog.setCanceledOnTouchOutside(false);
mDialog.setOnDismissListener(new DialogInterface.OnDismissListener() {
@Override
public void onDismiss(DialogInterface dialog) {
// TODO Auto-generated method stub
mDialog=null;
}
});
mDialog.show();
}
}
private void closeProgressDialog(){
if(mDialog!=null){
mDialog.dismiss();
mDialog=null;
}
}

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

2条回答 默认 最新

  • qq_24615691 qq_24615691 2017-08-11 03:28

    兼容性问题,试试别的手机

    点赞 评论 复制链接分享
  • qq_33756493 昵称_Justin 2017-08-11 09:43

    不要用this,换成别的试试

    点赞 评论 复制链接分享

相关推荐