计算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);










网友评论