【发布时间】:2014-11-11 05:35:20
【问题描述】:
当我像这样显示弹出窗口时,我希望能够使布局背景模糊或变暗。请帮帮我。
这是我的代码:
LayoutInflater inflater = (LayoutInflater) ResidentActivity.this
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View layout = inflater.inflate(
R.layout.activity_appselection,
(ViewGroup) findViewById(R.id.popuplayoutelement));
pwindo = new PopupWindow(layout, 470, 540, true);
pwindo.showAtLocation(layout, Gravity.CENTER, 0, 45);
我的输出显示这个
但我需要这样
【问题讨论】:
-
您是否尝试过至少在 Stackoverflow 或 Google 上进行搜索?
-
尝试设置透明度的 alpha 属性,其值范围为 0 到 1。
标签: android layout popupwindow