Use Platform Styles and Themes

Android provides user experience themes that give apps the look and feel of the underlying operating system. These themes can be applied to your app within the manifest file. By using these built in styles and themes, your app will naturally follow the latest
look and feel of Android with each new release.

To make your activity look like a dialog box:

<activity android:theme="@android:style/Theme.Dialog">

To make your activity have a transparent background:

<activity android:theme="@android:style/Theme.Translucent">

To apply your own custom theme defined in /res/values/styles.xml:

<activity android:theme="@style/CustomTheme">

To apply a theme to your entire app (all activities), add the android:theme attribute to the
<application> element:

<application android:theme="@style/CustomTheme">
时间: 2024-08-02 13:22:20

Use Platform Styles and Themes的相关文章

Android官方入门文档[11]支持不同平台版本

Android官方入门文档[11]支持不同平台版本 Supporting Different Platform Versions支持不同平台版本   This lesson teaches you to1.Specify Minimum and Target API Levels2.Check System Version at Runtime3.Use Platform Styles and Themes You should also read•Android API Levels•Andr

Android 开发者(Android Developer)

Android 开发者(Android Developer) 太阳火神的美丽人生 (http://blog.csdn.net/opengl_es) 本文遵循"署名-非商业用途-保持一致"创作公用协议 转载请保留此句:太阳火神的美丽人生 -  本博客专注于 敏捷开发及移动和物联设备研究:iOS.Android.Html5.Arduino.pcDuino,否则,出自本博客的文章拒绝转载或再转载,谢谢合作.       Android 开发者(Android Developer)官方网站在

Android应用如何支持屏幕多尺寸多分辨率问题

    作为Android应用程序开发者都知道android是一个"碎片化"的世界.多种系统版本.多种尺寸.多种分辨率.多种机型,还有不同的厂商定制的不同ROM,你开发的应用会在不可预期的手机上报错.这给开发适配带来不小的难度.这篇文章会告诉我们怎么解决这个问题. 1.Android碎片化 1.1.android系统版本 Android更新较大的版本如下:    上面只有当前可用版本,Android L作为开发者版本没有出现其中,未来会有更多的版本.下图给出Android各个版本的占有

Android官方入门文档[7]样式化操作栏

Android官方入门文档[7]样式化操作栏   Styling the Action Bar样式化操作栏   This lesson teaches you to1.Use an Android Theme2.Customize the Background3.Customize the Text Color4.Customize the Tab Indicator You should also read•Styles and Themes•Android Action Bar Style

GitHub上史上最全的Android开源项目分类汇总

今天在看博客的时候,无意中发现了 @Trinea在GitHub上的一个项目 Android开源项目分类汇总,由于类容太多了,我没有一个个完整地看完,但是里面介绍的开源项目都非常有参考价值,包括很炫的界面特效设计.个性化控件.工具库.优秀的Android开源项目.开发测试工具.优秀个人和团体等.可以这样说,每一位Andorid开发人员都能从中找到一个或多个适用自己项目的解决方案,消化吸收并加以利用,可以为自己的APP增色不少.文章最后还列出了部分国外著名Android开发者的信息,包括GitHub

Android 开源控件系列_1

第一部分 个性化控件(View) 主要介绍那些不错个性化的View,包括ListView.ActionBar.Menu.ViewPager.Gallery.GridView.ImageView.ProgressBar.TextView.ScrollView.TimeView.TipView.FlipView.ColorPickView.GraphView.UI Style等等..其他 一.ListView android-pulltorefresh一个强大的拉动刷新开源项目,支持各种控件下拉刷新

theme-在manifest中添加一个主题时出错

问题描述 在manifest中添加一个主题时出错 我在manifest文件中添加一个主题时,得到一个错误说找不到资源. 我用的是下面的代码,如何修改这个问题呢? <?xml version="1.0" encoding="utf-8"?> <resources> <style name="Texttheme" > <item name="android:textColor">#f

Android Theme详细

 1.系统主题Theme列表 2.详解每个主题中定义item分类 一个完整的主题应该定义哪些内容呢,以Theme为例,如下: 颜色 [html] view plain copy <item name="colorForeground">@android:color/bright_foreground_dark</item>      <item name="colorForegroundInverse">@android:co

Android API Guide 之 User Interface笔记

  一.Layouts 1  在XML中,标签名对应于代码中的类名,属性名对应于代码中的方法名 2 android:id="@+id/start" @ 让XML解析器知道后面的字符串应该解析为一个 Resource ID + 表明是自己定义的新的ID,不是系统built-in的, 如果使用系统的应该是这样android:id="@android:id/empty" 3 ViewGroup.LayoutParams 这是一个类,只不过是一个内部静态类,不过在这里把它当