Java Android弹出框全屏显示
2014-05-09 10:38:04 1293

extends Dialog

super(baseActivity, android.R.style.Theme_Translucent_NoTitleBar);

public void onCreate() {
		setContentView(R.layout.popunitdialog);
		// 设置全屏,会把状态栏隐藏
		WindowManager.LayoutParams lp = new WindowManager.LayoutParams();
		lp.copyFrom(this.getWindow().getAttributes());
		lp.width = WindowManager.LayoutParams.MATCH_PARENT;
		lp.height = WindowManager.LayoutParams.MATCH_PARENT;
		this.getWindow().setAttributes(lp);
}