Android Activity Theme Theme Settings

Source: Internet
Author: User
Tags transparent color

Android platform-defined theme styles: Android:theme= "@android: Style/theme.dialog" displays an activity as a dialog mode? android:theme= "@android: style/ Theme.notitlebar "Do not display the application title bar?" Android:theme= "@android: Style/theme.notitlebar.fullscreen" does not show the app title bar and fullscreen? Android: Theme= "@android: style/theme.light" background for 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, full screen? 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 "Use the system desktop for the 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 "Use 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 "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 ProgressBar style: Style = "Android:attr/progressbarstylehorizontal" style= "? Android:attr/progressbarstylelarge" style= "? android:attr/ Progressbarstylesmall "style="? Android:attr/progressbarstylesmalltitle "Separator Landscape: <viewandroid:layout_width=" fill _parent "android:layout_height=" 1dip "android:background="? Android:attr/listdivider "/> Portrait: <View android: Layout_width= "1dip" android:layout_height= "fill_parent" android:background= "Android:attr/listdivider"/> CheckBox style style= "? Android:attr/starstyle" like title bar effectTextviewstyle= "? Android:attr/listseparatortextviewstyle" other useful style 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 title bar style of the activity as added in Styles.xml < resources> <style name= "Autowindowtitlebackground" > <item name= "Android:background" > #778899 < /item> </style> <style name= "Autowindowtitlebar" parent= "Android:theme" > <item name= "and Roid: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 all Activity interfacesTitle bar Modification androidmanifest.xml Add android:theme= "@android: Style/theme.notitlebar" to the application tag-valid for classes that inherit activity. Android:theme= "@style/theme.appcompat.light.noactionbar" needle is valid for inheriting appcompatactivity

Original: http://www.cnblogs.com/guxingzhe/p/4857336.html

Method one: Through Theme.translucent[java] View plain copy@android:style/theme.translucent @android: style/  Theme.Translucent.NoTitleBar @android: Style/theme.translucent.notitlebar.fullscreen Only need to be in the manifest in the activity of transparent set theme for any of the above can be [Java] view plain copy<activity android:name= "       Com.vixtel.simulate.MainApp "android:configchanges=" keyboardhidden|orientation "android:label=" @string/app_name " android:screenorientation= "Portrait" Android:theme= "@android: Style/theme.translucent.notitlebar" > < intent-filter> <action android:name= "Android.intent.action.MAIN"/> <category android:name = "Android.intent.category.LAUNCHER"/> </intent-filter> </activity> method Two: Custom style, just like the style of a custom dialog        , add a transparent color value to the res-values-color.xml: [Java] View plain copy<?xml version= "1.0" encoding= "UTF-8"?> <resources> <color name= "Transparent" > #0000 </color> </resources> Add the following in Res-values-styles.xml: [Java] View plain Copy<style name= "mytransparent" > <item name= "android:windowbackground" > @color/transparent&lt ;/item> <item name= "Android:windownotitle" >true</item> <item name= "android:windowistranslucent ">true</item> <item name=" Android:windowanimationstyle "> @android: style/animation.translucent</ Item> </style> in manifest requires transparent activity settings theme for our custom can [Java] view plain copyandroid:theme= "@style/   Mytransparent "

Original: http://blog.csdn.net/mad1989/article/details/38122713/

Reference: http://blog.csdn.net/hongya1109110121/article/details/11985545

  

Android Activity Theme Theme Settings

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.