Android 自定义主题打断微调器外观
我目前正在使用设置选项动态更改主题。主题非常简单,只改变背景颜色。更改主题后,微调器看起来不正确,请参见图 我用一个自定义微调器项解决了第一个问题(微调器本身),该项将背景设置为透明Android 自定义主题打断微调器外观,android,Android,我目前正在使用设置选项动态更改主题。主题非常简单,只改变背景颜色。更改主题后,微调器看起来不正确,请参见图 我用一个自定义微调器项解决了第一个问题(微调器本身),该项将背景设置为透明 <TextView xmlns:android="http://schemas.android.com/apk/res/android" android:ellipsize="marquee" android:layout_height="wrap_content"
<TextView xmlns:android="http://schemas.android.com/apk/res/android"
android:ellipsize="marquee"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:singleLine="true"
style="?android:attr/spinnerItemStyle"
android:background="@android:color/transparent"
android:id="@android:id/text1" />
我用一个自定义微调器下拉项尝试了同样的方法,但没有成功。任何我能尝试获得默认微调器外观的想法都将不胜感激
编辑:我可以更改微调器\下拉菜单\项目背景,但下拉提示背景和分隔符是应用程序背景颜色,但我想要默认外观。
注意:删除了一个图片链接,这样我就可以发布最新的图片了
编辑:问题已经解决,最终只是一个简单的修复。不得不改变我的自定义主题
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:background">#EEE9E9</item>
</style>
#EEE9E9
在styles.xml中
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:windowBackground">@color/converter_grey</item>
</style>
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:windowBackground">@color/converter_grey</item>
</style>
@彩色/深灰色
xml的问题已经解决了,最终只是一个简单的解决方案。不得不改变我的自定义主题
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:background">#EEE9E9</item>
</style>
#EEE9E9
在styles.xml中
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:windowBackground">@color/converter_grey</item>
</style>
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:windowBackground">@color/converter_grey</item>
</style>
@彩色/深灰色
xml的问题已经解决了,最终只是一个简单的解决方案。不得不改变我的自定义主题
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:background">#EEE9E9</item>
</style>
#EEE9E9
在styles.xml中
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:windowBackground">@color/converter_grey</item>
</style>
<style name="grey" parent="@android:style/Theme.Light">
<item name="android:windowBackground">@color/converter_grey</item>
</style>
@彩色/深灰色
并在colors.xml中定义颜色