Android's style control theme

Source: Internet
Author: User

Value-v14 is the theme (other versions and so on) used on the API14 (4.0) Phone

The name of theme is called Apptheme, which is followed by which theme inherit from, as shown below

<style name= "Appbasetheme" parent= "@android: Style/theme.light.notitlebar" >
<item name= "Android:windowcontentoverlay" > @null </item>
<item name= "Android:windownotitle" >true</item>
<item name= "Android:textcolor" > @color/body_text_1</item>
<item name= "Android:textcolorhighlight" > @color/blue_400</item>
<item name= "Android:textcolorhint" > @color/grey_500</item>
<item name= "Android:textcolorlink" > @color/blue_500</item>
<item name= "Android:textsize" >16sp</item>
<item name= "Android:textstyle" >normal</item>
</style>

The parent can also be set to this form

<style name= "Appbasetheme" parent= "Android:Theme.Holo.Light" >
</style>

As we have seen, in theme we can set the color of the cursor, the color of the text, the color of hint, etc.

What really works is in the Manifest.xml file. This is defined in this file .

<application
Android:name= ". Hkapplication "
Android:configchanges= "Locale|keyboard|screensize|keyboardhidden"
Android:hardwareaccelerated= "true"
android:icon= "@drawable/app_logo"
Android:label= "@string/app_name"
android:logo= "@drawable/app_logo"
Android:theme= "@style/apptheme" >

Simply define the name of the Apptheme in the style of the value folder. Then Inherict from Appbasetheme. There are different definitions of appbasetheme files in different value folders.

This will be based on different APIs to take the different appbasetheme, and then make up apptheme, set into the program.

In fact, these things you create a new project in the inside will see the comments, very detailed. (This is the Style.xml under the value folder)

Android's style control theme

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.