Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No cursor in editText under Honeycomb

I have an application that uses an internal ime (meaning the ime is just code within the application and not a true ime). I use this ime panel to enter/edit an editText. Everything works fine up to Froyo (I have not tested under Gingerbread). On Honeycomb, however, I can input text and edit it but no cursor or text highlight is displayed! Does anyone know how to work around this? I'd rather not fork my code to a special Honeycomb version just to correct this one problem.

I have explicitly set the xml cursorVisible element to true and then set it to true with setCursorVisible in the code but that doesn't help.

Thanks!

like image 824
Vic Avatar asked Apr 29 '11 20:04

Vic


1 Answers

Add these attributes to your EditText, to make the blinking cursor black:

android:textColor="#000000"
android:textCursorDrawable="@null"

It's needed if you're using the Holo theme. From: https://stackoverflow.com/a/9165217/1267112

like image 177
Jimmy Avatar answered Sep 21 '22 12:09

Jimmy