Notice we used the @ symbol and? Symbol to apply the resource.
The @ symbol indicates that the resources we have applied are defined previously (either in the previous project or in the Android framework).
Question mark? Indicates that the value of the resource we are referencing has been defined in the current topic.
The differences between themes and styles differ mainly in
a theme cannot act on a single view build, and the theme should work for all the activity in the entire app or for the specified activity .
The format of the theme definition should be to change the appearance of the window format, such as window variants, window borders and so on.
Theme must be defined in the <application> or <activity> in androidmanifest.xml for the entire activity or for the entire application.
style is for view , such as Textview,edittext.
Choose a theme based on the Android version:
<name= "Lightthemeselector" parent= "Android:Theme.Light " > </ style >
Parent= "Android:theme instead of parent=" @android: Style/theme
Activity references can have @android: style/
<android:theme= "@android: style/theme.translucent">
or directly:
< Activity Android:name =". Mainactivity "android:theme=" @style/theme ">
Styles can :
The inheritance of a style can be inherited through the parent property to inherit the style that is already defined by Android
If an app uses theme, and the view in the app uses a style, the style takes precedence over the theme when theme conflicts with style style
Android styles (style) and themes (theme)