【发布时间】:2014-07-02 15:58:04
【问题描述】:
在我正在制作的应用程序中,我想为我的一些显示小部件(对话框、操作栏等)设置主题,但将 Theme.Holo 作为我不想设置主题的东西(按钮、微调器等)的父项
所以在我的清单中我改变了:
android:theme="@android:style/Theme.Holo"
到
android:theme="@style/CustomTheme"
然后在 theme.xml 中我创建了我的 CustomTheme 并覆盖了我的操作栏和对话框:
<!-- Custom Holo (Dark) Theme -->
<style name="CustomTheme" parent="@android:style/Theme.Holo">
<item name="android:actionBarStyle">@style/CarCastActionBar</item>
<item name="android:alertDialogTheme">@style/CustomDialogTheme</item>
<item name="android:dialogTheme">@style/CustomDialogTheme</item>
<item name="android:alertDialogStyle">@style/CustomDialogTheme</item>
</style>
只是现在我的微调器已经恢复到丑陋的白色,而不是扁平的透明外观。 为什么要这样做?如果有帮助,我可以附上图片
【问题讨论】:
标签: android xml android-spinner android-theme