I have an application that has 4 styles, each one has a different colorAccent
. Depending on the user actions, the style being used may change, and so does the colorAccent
.
There's also two somewhat-static
EditText
views ( these view won't disappear on the app's lifecycle, since they are present in the "Home" page of the app ). For reference, let's assume that I have:
2 Views
EditTextA
EditTextB
4 Styles
StyleR
withRed
ascolorAccent
StyleG
withGreen
ascolorAccent
StyleB
withBlue
ascolorAccent
StyleY
withYellow
ascolorAccent
If I have StyleR
as the current style and tap the EditTextA
the cursor will immediately appear coloured red. If I change the style to StyleG
, tap the EditTextA
, type something and select it, I'll have a red cursor with a green pointer beneath it. Meanwhile, if I tap the EditTextB
, the cursor will be green.
I've tried to Invalidate()
and PostInvalidate()
both views within the RunOnUiThread
, but they wouldn't correct their colours.
Any other EditText
that is inflated between the style changes get the correct colour.