PopWindow全屏

2022-09-06  本文已影响0人  霁逸lei

计算popView宽高

popupWindow.getContentView().measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
popupView.getMeasuredWidth();

PopWindow全屏

View popupView = View.inflate(context, R.layout.pop_gg_tips, null);
popupWindow = new PopupWindow(popupView, ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
popupWindow.setOutsideTouchable(true);
popupWindow.setFocusable(true);
//以下两行设置全屏
popupWindow.setClippingEnabled(false);
popupWindow.showAtLocation(tdxAppFuncs.getInstance().getMainActivity().getWindow().getDecorView(), Gravity.CENTER,0, 0);
上一篇 下一篇

猜你喜欢

热点阅读