我尝试过使用以下代码
Window window=getWindow();
WindowManager.LayoutParams wl = window.getAttributes();
wl.alpha=0.6f; //这句就是设置窗口里崆件的透明度的.0.0全透明.1.0不透明.
window.setAttributes(wl);
但不是变暗是我的 activity 变透明,和上个 Activity 叠加在一起了。
我尝试过使用以下代码
Window window=getWindow();
WindowManager.LayoutParams wl = window.getAttributes();
wl.alpha=0.6f; //这句就是设置窗口里崆件的透明度的.0.0全透明.1.0不透明.
window.setAttributes(wl);
但不是变暗是我的 activity 变透明,和上个 Activity 叠加在一起了。