Style resource
code example
<?xml version= "1.0" encoding= "Utf-8"?><linearlayout xmlns:android="Http://schemas.android.com/apk/res/android" Xmlns:tools="Http://schemas.android.com/tools"android:layout_width="Match_parent" android:layout_height="Match_parent"android:orientation="Vertical" > <edittext android:layout _width = "fill_parent" android:layout_height< /span>= "wrap_content" android:text = "Hello World" style = "@ Style/style1 "/> <EditTextandroid:layout_width="Fill_parent"android:layout_height= "Wrap_content" Android:text="Hello World"style="@style/style2"/> </linearlayout>
<resources> <!--Base application theme. <style name= "apptheme" parent="Android: Theme.Holo.Light.DarkActionBar "><! -- Customize your Theme here. --></style> <style name="Style1"><item name= "android: textSize">20sp</Item> <item name= "android: TextColor">#00d</Item ></style> <style name="Style2" parent="@style/style1"> <item name= "android: Background">#ee6</Item > <item name= "android:p adding">8dp</Item > <item name= "android: TextColor">#000</ Item></style></Resources>
Topic Resources
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Android style and theme (theme) Resources Introduction-android Learning Journey (56)