简体   繁体   English

Android edittext颜色白色背景上的白色

[英]Android edittext color white on white background

I am using the default action bar compat theme @style/Theme.AppCompat.Light.DarkActionBar but when I type into my edittext field in a dialog it is white(or really light grey) on a white background. 我正在使用默认的动作栏compat主题@ style / Theme.AppCompat.Light.DarkActionBar,但是当我在对话框中的edittext字段中键入内容时,它在白色背景上是白色(或实际上是浅灰色)。 I am trying to support 2.3.3 which has black dialogs and 4.+ which has white. 我正在尝试支持2.3.3带有黑色对话框和4. +带有白色对话框。 So i am just using the default themes but I don't understand why the default 4.+ theme has white text on a white background 所以我只是使用默认主题,但我不明白为什么默认4. +主题在白色背景上有白色文本

v14 v14

<!-- Base application theme. -->
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="android:actionMenuTextColor">#FFF</item>
    <item name="android:actionBarStyle">@style/MyActionBar</item>
    <!-- Support library compatibility -->
    <item name="actionBarStyle">@style/MyActionBar</item>
</style>

<!-- ActionBar styles -->
<style name="MyActionBar" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
    <item name="android:background">@color/bg_blue</item>

    <!-- Support library compatibility -->
    <item name="background">@color/bg_blue</item>
</style>

normal 正常

<!-- Base application theme. -->
<style name="AppTheme" parent="@style/Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
</style>

我用应用程序上下文而不是活动上下文来扩大布局

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM