}
Appendix: attrs. xml usage:
1. reference: refer to a resource ID.
(1) attribute definition:
(2) attribute usage:
Android: layout_width = "42dip"
Android: layout_height = "42dip"
Android: background = "@ drawable/image ID"
/>
2. color: color value.
(1) attribute definition:
(2) attribute usage:
Android: layout_width = "42dip"
Android: layout_height = "42dip"
Android: textColor = "#00FF00"
/>
3. boolean: boolean value.
(1) attribute definition:
(2) attribute usage:
Android: layout_width = "42dip"
Android: layout_height = "42dip"
Android: focusable = "true"
/>
4. dimension: dimension value.
(1) attribute definition:
(2) attribute usage:
Android: layout_width = "42dip"
Android: layout_height = "42dip"
/>
5. float: floating point value.
(1) attribute definition:
(2) attribute usage:
Android: fromalphi = "1.0"
Android: toAlpha = "0.7"
/>
6. integer: integer value.
(1) attribute definition:
(2) attribute usage:
Xmlns: android = "http://schemas.android.com/apk/res/android"
Android: drawable = "@ drawable/image ID"
Android: Required Tx = "50%"
Android: Ty = "50%"
Android: framesCount = "12"
Android: frameDuration = "100"
/>
7. string: string.
(1) attribute definition:
(2) attribute usage:
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
Android: apiKey = "0jokq80od1jl9c6haja99ugxcri2cgjko_bc_g"
/>
8. fraction: percentage.
(1) attribute definition:
(2) attribute usage:
Xmlns: android = "http://schemas.android.com/apk/res/android"
Android: interpolator = "@ anim/animation ID"
Android: fromDegrees = "0"
Android: toDegrees = "360"
Android: Required Tx = "200%"
Android: Ty = "300%"
Android: duration= "5000"
Android: repeatMode = "restart"
Android: repeatCount = "infinite"
/>
9. enum: enumeration value.
(1) attribute definition:
(2) attribute usage:
Xmlns: android = "http://schemas.android.com/apk/res/android"
Android: orientation = "vertical"
Android: layout_width = "fill_parent"
Android: layout_height = "fill_parent"
>
10. flag: bitwise OR operation.
(1) attribute definition:
(2) attribute usage:
Android: name = ". StyleAndThemeActivity"
Android: label = "@ string/app_name"
Android: windowSoftInputMode = "stateUnspecified | stateUnchanged | stateHidden">
Note:
You can specify multiple types of values when defining attributes.
(1) attribute definition:
(2) attribute usage:
Android: layout_width = "42dip"
Android: layout_height = "42dip"
Android: background = "@ drawable/image ID | #00FF00"
/>
Attribute values of style in androidAndroidTheme styles defined by the Platform:
Android: theme = "@ android: style/Theme. Dialog" shows an Activity as a Dialog box
? Android: theme = "@ android: style/Theme. NoTitleBar" does not display the application title bar
? Android: theme = "@ android: style/Theme. NoTitleBar. Fullscreen" does not display the application title bar, and is displayed in full screen.
? Android: theme = "@ android: style/Theme. Light": the background is white.
? Android: theme = "@ android: style/Theme. Light. NoTitleBar" the white background does not have a title bar.
? Android: theme = "@ android: style/Theme. Light. NoTitleBar. Fullscreen" white background, no title bar, full screen
? Android: theme = "@ android: style/Theme. Black" background Black
? Android: theme = "@ android: style/Theme. Black. NoTitleBar" the Black background does not have a title bar.
? Android: theme = "@ android: style/Theme. Black. NoTitleBar. Fullscreen" Black background, no title bar, full screen
? Android: theme = "@ android: style/Theme. Wallpaper" use the system desktop as the background of the application
? Android: theme = "@ android: style/Theme. Wallpaper. NoTitleBar" uses the system desktop as the background of the application without a title bar.
? Android: theme = "@ android: style/Theme. Wallpaper. NoTitleBar. Fullscreen" uses the system desktop as the background of the application, without a title bar, full screen
? Android: theme = "@ android: style/Translucent" Translucent Effect
? Android: theme = "@ android: style/Theme. Translucent. NoTitleBar" Translucent and no title bar
? Android: theme = "@ android: style/Theme. Translucent. NoTitleBar. Fullscreen" Translucent effect, no title bar, full screen
? Android: theme = "@ android: style/Theme. Panel"
AndroidThe Platform defines three font sizes:
"? Android: attr/textAppearanceLarge"
"? Android: attr/textAppearanceMedium"
"? Android: attr/textAppearanceSmall"
The new version seems to have added a Huge font Huge
AndroidFont color:
Android: textColor = "? Android: attr/textColorPrimary"
Android: textColor = "? Android: attr/textColorSecondary"
Android: textColor = "? Android: attr/textColorTertiary"
Android: textColor = "? Android: attr/textColorPrimaryInverse"
Android: textColor = "? Android: attr/textColorSecondaryInverse"
AndroidOfProgressBarStyle:
Style = "? Android: attr/progressBarStyleHorizontal"
Style = "? Android: attr/progressBarStyleLarge"
Style = "? Android: attr/progressBarStyleSmall"
Style = "? Android: attr/progressBarStyleSmallTitle"
Delimiter
Horizontal:
Android: layout_width = "fill_parent"
Android: layout_height = "1dip"
Android: background = "? Android: attr/listDivider "/>
Vertical:
Android: layout_height = "fill_parent"
Android: background = "? Android: attr/listDivider "/>
CheckBoxStyle
Style = "? Android: attr/starStyle"
Similar to the title bar EffectTextView
Style = "? Android: attr/listSeparatorTextViewStyle"
Other useful styles
Android: layout_height = "? Android: attr/listPreferredItemHeight"
Android: paddingRight = "? Android: attr/scrollbarSize"
Style = "? Android: attr/windowTitleBackgroundStyle"
Style = "? Android: attr/windowTitleStyle"
Android: layout_height = "? Android: attr/windowTitleSize"
Android: background = "? Android: attr/windowBackground"
ModifyActivityTitle bar style
For example, add
Next, modify the AndroidManifest. xml file, find the Activity to customize the title bar, and add the android: theme value, for example:
Remove allActivityTitle Bar of the interface
Modify AndroidManifest. xml
Add android: theme = "@ android: style/Theme. NoTitleBar" to the application tag"
Refer:Http://www.cnblogs.com/bluestorm/archive/2013/03/20/2971742.html
Http://blog.sina.com.cn/s/blog_62ef2f14010105vi.html
Http://www.krislq.com/2013/04/android_class_change_skin/
Http://blog.csdn.net/wsscy2004/article/details/7562909