对于下面的程序有些不理解,求指点!
AlertDialog.Builder ab = new AlertDialog.Builder(this);
AlertDialog dlg = ab.create(); // LayoutInflater factory = LayoutInflater.from(this );
//
// View view = factory.inflate(R.layout.aboutpop, null);
dlg.setCanceledOnTouchOutside(true);//设置dialog外面点击则消失
Window w=dlg.getWindow();
WindowManager.LayoutParams lp =w.getAttributes();
dlg.onWindowAttributesChanged(lp);
lp.x=20;
lp.y=0; // dlg.setView(view);
dlg.show();
方法二:
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
AlertDialog.Builder ab = new AlertDialog.Builder(this);
AlertDialog dlg = ab.create(); // LayoutInflater factory = LayoutInflater.from(this );
//
// View view = factory.inflate(R.layout.aboutpop, null);
dlg.setCanceledOnTouchOutside(true);//设置dialog外面点击则消失
Window w=dlg.getWindow();
WindowManager.LayoutParams lp =w.getAttributes();
dlg.onWindowAttributesChanged(lp);
lp.x=20;
lp.y=0; // dlg.setView(view);
dlg.show();
方法二:
requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND,
WindowManager.LayoutParams.FLAG_BLUR_BEHIND);
AlertDialog.Builder用来建弹窗。
最好去查查API文档。