Problem 1: The problem lies in the theme of the application . Try changing the theme to a darker theme, for example:
<style name="AppBaseTheme" parent="android:Theme.Black">
and he should solve your problem. I found this similar problem before and fixed it by changing the subject. But I didnβt understand much, but I feel that this is a problem with Android, and the bubble should try to change the text color according to the theme.
Let me know if it solves your problem or not.
Problem 2: Another problem you are talking about, because it does not focus, you can consider the following link: Truncation of the text and the problem with focus .
---------------------------------------- Updated answer-- ------ ------------------------------------- p>
Q1) What should I add to the theme configuration in order for it to always work, no matter what theme I use?
According to my conclusions, here are some results:
[ Note: only applicable for devices running 3.0 and above]
If your build target:
less than 11 then using
parent="android:Theme.Light" --> setError() message doesn't work or shows very faded text colour almost blending with color white parent="android:Theme" --> setError() message works
greater than 11 then using
parent="android:Theme.Holo.Light" --> setError() message works parent="android:Theme.Holo" --> setError() message works
Since your project is supported for devices with an API level of less than 11, and you also want to support 4.0 and plus, it is best to go and integrate HoloEverywhere in your project, which will solve your problem, and you can also use your ActionBarSherlock to ensure compatibility, check the SO Post .
Q2) What are the available configurations for the error indication UI ?
Basically you can customize drawings and icons, but I doubt you can customize your text and background (if anyone else can point this out)
I suggest you check out this SO Post for immediate answers.
And to place the correct focus, for each validation check, you can put this code:
EditText.setFocusableInTouchMode(true); EditText.requestFocus(); EditText.setError("My Error Text");
Let me know of any issues.