Theme: Form level, changing form style
style--<
Style: The form element level that changes the style of the specified control or layout.
New custom style and theme:1. Create a new file named Style.xml in the Res/values directory 2. Add a <resources> root node.
<resources> <style name= "Specialtext" parent= "@style/text" > <item name= "Android:textsize" > 18sp</item> <item name= "Android:textcolor" > #008 </item> </style></resources>
3. You can then use the Specialtext to apply Style4.item to define the name attribute, internally define the value of the style (the property of the name in item can be a string, a color represented by a 16 binary number, or a reference to another resource.) The content in 5.parent represents a custom style that inherits directly or indirectly from Android's standard style *********** use method ***********
<edittext id= "@+id/text1" style= "@style/specialtext" android:layout_width= "Fill_parent" android: layout_height= "Wrap_content" android:text= "Hello, world!"/>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ and Style,theme are still in the <style>, also quoted in the same way.
<?xml version= "1.0" encoding= "Utf-8"?><resources> <style name= "Customtheme" > <item name= " Android:windownotitle ">true</item> <item name=" Windowframe ">@drawable/screen_frame </item> <item name= "Windowbackground" > @drawable/screen_background_white</item> < Item Name= "panelforegroundcolor" > #FF000000 </item> <item name= "Panelbackgroundcolor" > #FFFFFFFF </item> <item name= "Paneltextcolor" >panelforegroundcolor</item> <item name= "Paneltextsize" >14</item> <item name= "Menuitemtextcolor" >?paneltextcolor</ item> <item name= "menuitemtextsize" >?panelTextSize</item> </style></resources>
* * location of the app resource @ symbol: Indicates that the resource for the app was previously defined (either in the previous project or in the Android frame).? Indicates that the value of the referenced resource has been defined in the current topic. You can do this by referencing the name defined in <item> (PaneltextcolorUse the color andas defined in the Panelforegroundcolor)。 This technique can only be used in XML resources. Note that theme must set the theme in the manifest----next to learn the source: http://zyfromcq.iteye.com/blog/1401710
Android----Style