1、在AndroidManifest.xml文件中设置:

1
android:theme="@android:style/Theme.Translucent

此代码固定为全背景透明。

2、在Activity的onCreate()方法中设置:

1
2
3
4
5
6
Window window=getWindow();
WindowManager.LayoutParams wl = window.getAttributes();
wl.flags=WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON;
//这句就是设置窗口里控件的透明度的.0.0全透明.1.0不透明.
wl.alpha=0.6f;
window.setAttributes(wl);

 

http://www.cnblogs.com/swalka/p/5237854.html

 

相关文章:

  • 2021-11-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-21
  • 2021-08-27
  • 2022-01-13
  • 2022-12-23
  • 2021-11-17
  • 2022-02-17
  • 2022-12-23
相关资源
相似解决方案