1. Set the form transparency.
Windowmanager. layoutparams Lp = getwindow (). getattributes ();
LP. Alpha = 0.5f;
Getwindow (). setattributes (LP );
Alpha is between 0.0f and 1.0f.
2. Set the darkness.
Windowmanager. layoutparams Lp = getwindow (). getattributes ();
LP. dimamount = 0.5f;
Getwindow (). setattributes (LP );
Getwindow (). addflags (windowmanager. layoutparams. flag_dim_behind );
Dimamount is between 0.0f and 1.0f.
3. Set background blur
Getwindow (). setflags (windowmanager. layoutparams. flag_blur_behind,
Windowmanager. layoutparams. flag_blur_behind );
4. Call the view method view =...
View. getbackground (). setalpha (100); // 0 ~ 255 transparency value, 0 is completely transparent, 255 is not transparent
5. Add the following content to the activity attribute configuration in the configuration file:
Android: theme = "@ Android: style/theme. translucent"
In this way, the android transparent style is called!
OK. That's all. Add more later.