【发布时间】:2016-08-06 06:24:23
【问题描述】:
Android PopupWindow 在设置高度时不显示阴影。它似乎从文档中支持它。我正在使用 5.0 棒棒糖。
如下创建弹出窗口:
popupWindow = new PopupWindow(context);
popupWindow.setOutsideTouchable(true);
popupWindow.setFocusable(true);
popupWindow.setElevation(10);
popupWindow.setContentView(rootView);
popupWindow.showAtLocation(anchorView, Gravity.NO_GRAVITY, xPos, yPos);
【问题讨论】:
-
您是否在应用程序的其他地方出现阴影,例如来自 ActionBar?
-
是的,阴影在其他任何地方都可以正常工作。
-
Patrick,你能解决这个问题吗?
-
我不得不推出自己的解决方案。
标签: android android-5.0-lollipop android-popupwindow