标签:
/** * 让popupwindow以外区域阴影显示 * @param popupWindow */ private void popOutShadow(PopupWindow popupWindow) { WindowManager.LayoutParams lp = activity.getWindow().getAttributes(); lp.alpha = 0.7f;//设置阴影透明度 activity.getWindow().setAttributes(lp); popupWindow.setOnDismissListener(new PopupWindow.OnDismissListener() { @Override public void onDismiss() { WindowManager.LayoutParams lp = activity.getWindow().getAttributes(); lp.alpha = 1f; activity.getWindow().setAttributes(lp); } }); }
标签:
原文地址:http://www.cnblogs.com/epmouse/p/5422229.html