作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想将 Date Picker 的背景从白色更改为黑色,我认为可以通过将我的应用主题更改为 holo dark 来完成。
目前是: 我想把它改成全黑
因此,目前我在 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>
主要文件
<application
.....
android:theme="@style/AppTheme" >
.......
</application>
我正在使用 appcompat_v7
,那么我应该如何修改我的 styles.xml
使用 Holo Light 和 Dark Date Picker?
最佳答案
当应用程序使用 appcompat_v7 时,将 Theme.AppCompat
设置为主题的父项解决了这个问题!
Theme.AppCompat
在视觉上与 Theme.Holo(深色)相同。
有关详细信息,请参阅 Android 文档 ActionBar获取更多信息!
关于android - 如何在 Eclipse 中更改应用程序主题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25141195/
我是一名优秀的程序员,十分优秀!