Android 弹出对话框使底部背景变暗

WindowManager.LayoutParams lp = getWindow().getAttributes(); 
lp.alpha = 0.6f; //值越大越透明,即不暗
getWindow().setAttributes(lp); 
getWindow().addFlags(WindowManager.LayoutParams.FLAG_DIM_BEHIND); 

猜你喜欢

转载自www.cnblogs.com/xuyj/p/9052966.html