from://http://liangoogle.iteye.com/blog/1848448
The difference between Theme.xml and Style.xml in Android:
Same point:
The definition of the two is the same.
- < Resources >
- < style name="Theme"parent="Android:Theme.Black">
- < Item name="Android:windownotitle">true< /item>
- < Item name="android:textsize">14sp< /item>
- < Item name="Android:textcolor">#FFFF0000< /item>
- < /style>
- < /resources>
Different points:
First, the use of different places
1.theme.xml: Has a global impact on an entire application or on an activity.
In Androidmanifest.xml:
<application android:theme= "@android: Style/theme";
<activity android:theme= "@android: Style/theme";
Application and activity in Java: SetTheme (r.style.theme);
2 Style.xml: Used in a separate view.
<edittext android:layout_height="Wrap_content"
android:text="EditText"
style="@style/title"
Android:layout_width="Fill_parent"
android:id="@+id/edittext1"></EditText>
In the R.ATTR definition, some properties that begin with window are only valid for theme.
Third, if an application uses theme, and the view used in the application also uses a style, the style has precedence over the theme when theme conflicts with style style.