Theme styles for Android tags

Source: Internet
Author: User

Theme styles defined by the Android platform:

Android:theme= "@android: Style/theme.dialog" displays an activity as a dialog box mode

android:theme= "@android: Style/theme.notitlebar" does not display the application title bar
android:theme= "@android: Style/theme.notitlebar.fullscreen" does not display the application title bar and full screen

android:theme= "@android: style/theme.light" background is white
android:theme= "@android: Style/theme.light.notitlebar" white background with no title bar
android:theme= "@android: Style/theme.light.notitlebar.fullscreen" white background, no title bar, fullscreen

android:theme= "@android: Style/theme.black" Background black
android:theme= "@android: Style/theme.black.notitlebar" Black background with no title bar
android:theme= "@android: Style/theme.black.notitlebar.fullscreen" Black background, no title bar, fullscreen

android:theme= "@android: Style/theme.wallpaper" with system desktop for application background
android:theme= "@android: Style/theme.wallpaper.notitlebar" uses the system desktop as the application background with no title bar
android:theme= "@android: Style/theme.wallpaper.notitlebar.fullscreen" with system desktop for application background, no title bar, fullscreen

android:theme= "@android: style/translucent" translucent effect
android:theme= "@android: Style/theme.translucent.notitlebar" translucent with no title bar
android:theme= "@android: Style/theme.translucent.notitlebar.fullscreen" Translucent effect, no title bar, fullscreen
android:theme= "@android: Style/theme.panel"

The Android platform defines three font sizes:

"? Android:attr/textappearancelarge"
"? Android:attr/textappearancemedium"
"? Android:attr/textappearancesmall"

Android Font Color:

Android:textcolor= "? Android:attr/textcolorprimary"
Android:textcolor= "? Android:attr/textcolorsecondary"
Android:textcolor= "? Android:attr/textcolortertiary"
Android:textcolor= "? Android:attr/textcolorprimaryinverse"
Android:textcolor= "? Android:attr/textcolorsecondaryinverse"

Android's ProgressBar style:

Style= "? Android:attr/progressbarstylehorizontal"
Style= "? Android:attr/progressbarstylelarge"
Style= "? Android:attr/progressbarstylesmall"
Style= "? Android:attr/progressbarstylesmalltitle"

Separator

Transverse:

<view
Android:layout_width= "Fill_parent"
android:layout_height= "1dip"
Android:background= "? Android:attr/listdivider"/>


Longitudinal:

<view android:layout_width= "1dip"
android:layout_height= "Fill_parent"
Android:background= "? Android:attr/listdivider"/>

CheckBox Style

Style= "? Android:attr/starstyle"


TextView like the title bar effect
Style= "? Android:attr/listseparatortextviewstyle"

Other useful styles
android:layout_height= "? Android:attr/listpreferreditemheight"
android:paddingright= "? Android:attr/scrollbarsize"
Style= "? Android:attr/windowtitlebackgroundstyle"
Style= "? Android:attr/windowtitlestyle"
android:layout_height= "? Android:attr/windowtitlesize"
Android:background= "? Android:attr/windowbackground"

Modify the activity's title bar style

As in Styles.xml, add
<resources>
<style name= "Autowindowtitlebackground" >
<item name= "Android:background" > #778899 </item>
</style>
<style name= "Autowindowtitlebar" parent= "Android:theme" >
<item name= "Android:windowtitlesize" >32dp</item>
<item name= "Android:windowtitlebackgroundstyle" > @style/autowindowtitlebackground</item>
</style>
</resources>
then modify the Androidmanifest.xml file, find the activity to customize the title bar, add the Android:theme value, such as:
<activity android:name=".MainActivity" android:theme="@style/autoWindowTitlebar">

Remove the title bar from all activity interfaces
Modify Androidmanifest.xml

Add Android:theme= "@android: Style/theme.notitlebar" in the application tag

Original address: http://blog.sina.com.cn/s/blog_70c759fd01013phv.html

Theme styles for Android tags

Related Article

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.