
创建d出窗口如下所示:
popupWindow = new PopupWindow(context); popupWindow.setoutsIDetouchable(true); popupWindow.setFocusable(true); popupWindow.setElevation(10); popupWindow.setContentVIEw(rootVIEw); popupWindow.showAtLocation(anchorVIEw,Gravity.NO_GraviTY,xPos,yPos);解决方法 为 answered by an Android developer.
If the inflated vIEw doesn’t have a background set,or the popup
window itself doesn’t have a background set (or has a transparent
background) then you won’t get a shadow.
这是我的情况,似乎是你的,因为你不使用setBackgroundDrawable.
这对我有用
popupWindow.setBackgroundDrawable(new colorDrawable(color.WHITE));
我打开了一个新的问题,提示他们更新文档(https://code.google.com/p/android/issues/detail?id=174919)
总结以上是内存溢出为你收集整理的Android PopupWindow高程不显示阴影全部内容,希望文章能够帮你解决Android PopupWindow高程不显示阴影所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)