Style can be applied to view and activity or application.
Application on view: Style = "", application on activity and application: Android: theme = "".
When a view is set with a style, but the attributes in this style are not applicable to this view, this view will simply ignore this parameter.
After Android: theme is used to set a style for the application or activity, each view in it inherits the style by default. If the view has its own style set, the attributes set in theme are overwritten.
Set a style for viewgroup. The view in the style does not apply the attributes in the style.
Style definition: (it can be placed in any file suffixed with ". xml". The file name does not matter, and the style name must be unique)
<?xml version="1.0" encoding="utf-8"?>
<style name="CodeFont" parent="@android:style/TextAppearance.Medium">
Note the following points about style inheritance:
1. inherit the built-in style in Platform:
2. inherit the defined:
Separated by ".", style: codefont. Red inherits from style: codefont.