1. Demo description and demonstration
- Translucentbulr: In this example, blur is different from translucent, that is, other activities behind the current activity are displayed in Fuzzy mode. This is set through the flag of the window object.
- Wallpaper: wallpaper describes how to use a style to set the system wallpaper as the background of the current activity.
Demo
2. Video description
Http://www.eyeandroid.com/thread-11139-1-1.html
3. Demo Analysis
This example is different from translucent in Blur, that is, other activities displayed behind the current activit are displayed in Fuzzy mode.
This is set through the flag of the window object.
- Getwindow (). setflags (windowmanager. layoutparams. flag_blur_behind,
- Windowmanager. layoutparams. flag_blur_behind );
Other theme and translucent settings are the same.
Certificate -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Wallpaper describes how to use a style to set the system wallpaper as the background of the current activity. This is the definition of wallpaperactivity in androidmanifest. xml: <Activity Android: Name = ". App. wallpaperactivity" Android: Label = "@ string/activity_wallpaper" Android: theme = "@ style/theme. Wallpaper"> <Intent-filter> <Action Android: Name = "android. Intent. Action. Main"/> <Category Android: Name = "android. Intent. Category. sample_code"/> </Intent-filter> </Activity> @ Style/theme. wallpaper is defined as follows: Inherit the Android: style/theme. wallpaper system and set the foreground color to white (the text color here) <! -A theme that has a wallpaper background. Here we explicitly specify That this theme is to inherit from the system's wallpaper theme, Which sets up various attributes correctly.-> <Style name = "theme. Wallpaper" parent = "Android: style/theme. Wallpaper"> <Item name = "Android: colorforeground"> # fff </item> </Style> |
4. We learned this demo.
Android Application Development-Android: Theme
Http://www.eyeandroid.com/thread-8106-1-1.html