user1634451
user1634451

Reputation: 5212

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. I am trying to support 2.3.3 which has black dialogs and 4.+ which has white. 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

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>

Upvotes: 0

Views: 797

Answers (1)

user1634451
user1634451

Reputation: 5212

I was inflating the layout with the application context not the activity context

Upvotes: 2

Related Questions