AlertDialog 背景颜色透明设置

工作中遇到dialog背景不透明,导致dialog弹出框在布局后面会有dialog的背景边框。

在Dialog中设置如下代码即可使Dialog背景透明。

AlertDialog dialog = new AlertDialog.Builder(mContext).create();
final Window window = dialog.getWindow();
window.setBackgroundDrawable(new ColorDrawable(0));

猜你喜欢

转载自blog.csdn.net/lemon_husky/article/details/75007240
今日推荐