其他
View dialogView =
View.
inflate(context
, R.layout.
dialog_appoint_enlist_fail, null)
;
final Dialog dialog =
new Dialog(context
,R.style.
noTitleDialog)
;
WindowManager.LayoutParams wl = window.getAttributes()
;
wl.
x =
0;
wl.
y = DensityUtil.
getScreenHeight()
;//这里是获取屏幕的高
dialog.onWindowAttributesChanged(wl)
;//设置显示位置
LinearLayout.LayoutParams params =
new LinearLayout.LayoutParams(DensityUtil.
dip2px(
285)
,DensityUtil.
dip2px(
179))
;
dialog.setContentView(dialogView
, params)
;
dialog.setCancelable(
true)
;
dialog.setCanceledOnTouchOutside(
true)
;
dialog.show()
;
转载请注明原文地址: https://ju.6miu.com/read-679979.html