标签:dialog 对话框
//在dialog.show()之后调用 public static void setDialogWindowAttr(Dialog dlg,Context ctx){ Window window = dlg.getWindow(); WindowManager.LayoutParams lp = window.getAttributes(); lp.gravity = Gravity.CENTER; lp.width = LayoutParams.WRAP_CONTENT;//宽高可设置具体大小 lp.height = LayoutParams.WRAP_CONTENT; dlg.getWindow().setAttributes(lp); }
本文出自 “爬过山见过海” 博客,请务必保留此出处http://670176656.blog.51cto.com/4500575/1733725
标签:dialog 对话框
原文地址:http://670176656.blog.51cto.com/4500575/1733725