[Wish] EditText Cursor Color and/or Actionbar Menu Text Color

Roger Garstang

Well-Known Member
Licensed User
Longtime User
Need a way of controlling these somehow. Depending on Holo Theme being light or dark these seem to be linked.

If I set the theme to dark then they are both white. This works ok for the Actionbar since it is dark, but I get no cursor in my EditTexts if their background is white...even though the text is black. (Cursor is white)

If I set it to Holo Light then I get my cursor back, but the Titlebar has Dark Text on a Dark background.

I've read somewhere about setting the cursor drawable to null to make it use text color, but it appears to be in XML only.
 

lymey

Active Member
Licensed User
Longtime User
Need a way of controlling these somehow. Depending on Holo Theme being light or dark these seem to be linked.

If I set the theme to dark then they are both white. This works ok for the Actionbar since it is dark, but I get no cursor in my EditTexts if their background is white...even though the text is black. (Cursor is white)

If I set it to Holo Light then I get my cursor back, but the Titlebar has Dark Text on a Dark background.

I've read somewhere about setting the cursor drawable to null to make it use text color, but it appears to be in XML only.

I agree, it is really frustrating, and somewhate ridiculus to be able to change the EditText background and text, and not have the cursor reflect the text color. so yes +++1 on my wish list!
 

joop

Active Member
Licensed User
Longtime User
Yes, that would be nice .
I am struggling , with cursor colours and different android versions
Sometimes it's black , then blue ,then white all with the same code .
 

joop

Active Member
Licensed User
Longtime User
With The DEFAULT color you mean ,the default property text color from the Edittext view ?
 

DonManfred

Expert
Licensed User
Longtime User
Can this be done with XmlLayoutBuilder with an Edittext view

Yes. Erel said

The only way to change the cursor color is by declaring the EditText in XML and then loading it with XmlLayoutBuilder library.

But, sorry, i dont have experiences too with xml-layouts
 
Top