个人笔记,留下以后用。
android 自定义alertdialog宽充满屏幕
alertDialog = new AlertDialog.Builder(this).setCancelable(false) .create(); alertDialog.setView(getLayoutInflater().inflate( R.layout.diy_exit_alertdialog, null)); alertDialog.show(); alertDialog.setCanceledOnTouchOutside(false); dialogWindow = alertDialog.getWindow(); alertDialog.getWindow().getAttributes().width=
(int)dialogWindow.getWindowManager().getDefaultDisplay().getWidth(); dialogWindow.setGravity(Gravity.BOTTOM);
本文由 kevin 创作,采用 知识共享署名4.0 国际许可协议进行许可。
本站文章除注明转载/出处外,均为本站原创或翻译,转载前请务必署名。