Theme and style in the Android system)

Source: Internet
Author: User

Theme:

  1. • Android: theme = "@ Android: style/theme. Dialog" shows an activity as a dialog box
  2. • Android: theme = "@ Android: style/theme. notitlebar" Do Not Display ApplicationsProgramTitle Bar
  3. • Android: theme = "@ Android: style/theme. notitlebar. fullscreen": The application title bar is not displayed and displayed in full screen.
  4. • Android: theme = "@ Android: style/theme. Light" the background is white
  5. • Android: theme = "@ Android: style/theme. Light. notitlebar" the white background does not have a title bar.
  6. • Android: theme = "@ Android: style/theme. Light. notitlebar. fullscreen" white background, no title bar, full screen
  7. • Android: theme = "@ Android: style/theme. Black" background black
  8. • Android: theme = "@ Android: style/theme. Black. notitlebar" the black background does not have a title bar.
  9. • Android: theme = "@ Android: style/theme. Black. notitlebar. fullscreen" black background, no title bar, full screen
  10. • Android: theme = "@ Android: style/theme. Wallpaper" uses the system desktop as the background of the application
  11. • Android: theme = "@ Android: style/theme. wallpaper. notitlebar" uses the system desktop as the background of the application without a title bar.
  12. • Android: theme = "@ Android: style/theme. wallpaper. notitlebar. fullscreen" uses the system desktop as the background of the application, with no title bar and full screen
  13. • Android: theme = "@ Android: style/translucent" Translucent Effect
  14. • Android: theme = "@ Android: style/theme. translucent. notitlebar" translucent and no title bar
  15. • Android: theme = "@ Android: style/theme. translucent. notitlebar. fullscreen" Translucent effect, no title bar, full screen
  16. • Android: theme = "@ Android: style/theme. Panel"
  17. • Android: theme = "@ Android: style/theme. Light. Panel"

CopyCode

A collection of built-in styles in Android:

The Android platform defines three font sizes.

    1. "? Android: ATTR/textappearancelarge"
    2. "? Android: ATTR/textappearancemedium"
    3. "? Android: ATTR/textappearancesmall"

Copy code

Usage:

    1. Android: textappearance = "? Android: ATTR/textappearancelarge"
    2. Android: textappearance = "? Android: ATTR/textappearancemedium"
    3. Android: textappearance = "? Android: ATTR/textappearancesmall"

Copy code

Or

    1. Style = "? Android: ATTR/textappearancelarge"
    2. Style = "? Android: ATTR/textappearancemedium"
    3. Style = "? Android: ATTR/textappearancesmall"

Copy code

Android font color

    1. Android: textcolor = "? Android: ATTR/textcolorprimary"
    2. Android: textcolor = "? Android: ATTR/textcolorsecondary"
    3. Android: textcolor = "? Android: ATTR/textcolortertiary"
    4. Android: textcolor = "? Android: ATTR/textcolorprimaryinverse"
    5. Android: textcolor = "? Android: ATTR/textcolorsecondaryinverse"

Copy code

Androidprogressbar

    1. Style = "? Android: ATTR/progressbarstylehorizontal"
    2. Style = "? Android: ATTR/progressbarstylelarge"
    3. Style = "? Android: ATTR/progressbarstylesmall"
    4. Style = "? Android: ATTR/progressbarstylesmalltitle"

Copy code

Horizontal separator:

    1. <View
    2. Android: layout_width = "fill_parent"
    3. Android: layout_height = "1dip"
    4. Android: Background = "? Android: ATTR/listdivider "/>

Copy code

Vertical separator:

    1. <View Android: layout_width = "1dip"
    2. Android: layout_height = "fill_parent"
    3. Android: Background = "? Android: ATTR/listdivider "/>

Copy code

Checkbox

    1. Style = "? Android: ATTR/starstyle"

Copy code

Others

    1. // Textview similar to the title bar Effect
    2. Style = "? Android: ATTR/listseparatortextviewstyle"
    3. // Other useful styles
    4. Android: layout_height = "? Android: ATTR/listpreferreditemheight"
    5. Android: paddingright = "? Android: ATTR/scrollbarsize"
    6. Style = "? Android: ATTR/windowtitlebackgroundstyle"
    7. Style = "? Android: ATTR/windowtitlestyle"
    8. Android: layout_height = "? Android: ATTR/windowtitlesize"
    9. Android: Background = "? Android: ATTR/windowbackground"

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.