【发布时间】:2014-08-05 14:23:20
【问题描述】:
我想将日期选择器的背景从白色更改为黑色,我认为可以通过将我的应用主题更改为全息黑暗来完成。
目前是: 我想把它改成全息黑
所以,目前我在 values 文件夹中的 styles.xml 是
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>
values-v11 styles.xml
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>
values-v14 styles.xml
<resources>
<!--
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
-->
<style name="AppBaseTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- API 14 theme customizations can go here. -->
</style>
</resources>
Mainifest.xml
<application
.....
android:theme="@style/AppTheme" >
.......
</application>
我正在使用 appcompat_v7,那么我应该如何修改我的 styles.xml 使用 Holo Light and Dark Date Picker?
【问题讨论】:
-
你在使用 HoloEverywhere 吗?如果您不使用它,请删除标签。
-
这里可以找到解决问题的线索:stackoverflow.com/q/18839895
-
一条线索总是令人沮丧和折磨,除非它解决了你的问题
-
如何在可视化布局编辑器中更改该屏幕的样式?
-
@jesses.co.tt 如果我们使用自定义对话框,这是可能的,但是自定义日期选择器将是一个很大的麻烦!
标签: android xml eclipse android-theme android-appcompat