如何解决Android移除PopupWindow背景
| 我使用PopupWindow类创建自定义弹出窗口。 但是当我在main上添加layout_margin(在我的示例中为15dp)时,会有透明的灰色背景。 如何删除透明背景? 请看图片 编辑 这是我的代码 window = new PopupWindow(customTool.getContext());
window.setWidth(WindowManager.LayoutParams.FILL_PARENT);
window.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);
window.setTouchable(true);
window.setFocusable(true);
window.setoutsidetouchable(true);
window.setAnimationStyle(R.style.Animations_PopDownMenu_Left);
window.setContentView(customTool);
window.showAtLocation(customTool,Gravity.NO_GraviTY,100);
解决方法
嗯-尝试在弹出对话框中设置尝试
yourDiag.setBackgroundDrawable(null);
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。