Ice Cream Sandwich broke setError() for EditText?
-
28-10-2019 - |
Question
I use setError() on a EditText for validation. It was working fine prior to upgrading to ICS, but now the error box is empty. How do I fix this?
Solution
I was able to reproduce this on my Nexus S running Android 4.0.3.
Here's how I made it work.
Create a theme with:
<style name="MyApp.Theme.Light.NoTitleBar" parent="@android:style/Theme.Light.NoTitleBar"> <item name="android:textColorPrimaryInverse">@android:color/primary_text_light </item> </style>
Apply
MyApp.Theme.Light.NoTitleBar
theme to my application / activity from manifest.<application android:name=".MyApp" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/MyApp.Theme.Light.NoTitleBar" >
OTHER TIPS
Might it be connected to this reported bug?
Issue 22920: EditText: setError not readable when using Light Theme
Don't know how to fix or get around it though. =(
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow