更改Android应用程序的基本主题颜色 [英] Change basic theme color of android application

查看:1242
本文介绍了更改Android应用程序的基本主题颜色的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每一个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>

这篇关于更改Android应用程序的基本主题颜色的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆