更改Android应用程序的基本主题颜色应用程序、颜色、基本、主题

由网友(枕千古)分享简介:每一个Android应用程序/主题HAST它自己的基本主题颜色:Every android application/theme hast it's own basic theme color:HTC Desire Z的 - 绿色,HTC Desire Z - green,大多数的三星移动机 - 黄色,... m...

每一个Android应用程序/主题HAST它自己的基本主题颜色:

Every android application/theme hast it's own basic theme color:

HTC Desire Z的 - 绿色,

HTC Desire Z - green,

大多数的三星移动机 - 黄色,...

most Samsung deviced - yellow,...

这是选择列表中的项目,选项菜单,单选按钮,单选按钮,进度条,...

It's the color of selected list items, option menu-radio button, radio button, progress-bars,....

我知道如何改变这些颜色的人。但是,有没有办法通过设定一个值来改变所有的人?

I know how to change these colors individual. But is there a way to change all of them by setting one value?

是这样的:

<style name="my_theme" parent="@android:style/Theme.Black">
      <item name="android:_DEFAULT_BASE_COLOR_1">#XXXXXX</item>
</style>

//编辑:

//

所以我在寻找_DEFAULT_BASE_COLOR_1,在那里我可以为单选按钮颜色的关键字,slected列表项只有一个项目。这可能吗?

So I'm looking for the keyword of _DEFAULT_BASE_COLOR_1, where I can set a color for radio button, slected list item with only one item. Is it possible?

推荐答案

在你的表现在应用程序标签定义为:

In your manifest in application tag define as :

    android:theme="@style/mytheme"

现在在RES /值,您可以定义一个文件说theme.xml与内容为:

Now in res/values you can define a file say theme.xml with content as :

<resources> 
    <style name="mytheme" parent="@android:style/Theme" > 
       <item name="android:_DEFAULT_BASE_COLOR_1">#XXXXXX</item>
       <item name="android:windowNoTitle">true</item>
        ... . 
    </style>
</resources>
阅读全文

相关推荐

最新文章