In my app, I have an edit text with properties:
android:inputType="none"
and android:textIsSelectable="true"
.
It's because I have defined my own buttons to enter input (buttons, not custom keyboard). I have used
editText.requestFocus()
to make the cursor visible. Upto to android 4.0.4, the cursor is visible and not in phones running Jelly Bean. The cursor isn't visible but I'm able touch and enter text between characters ( using editText.getSelectionStart()
).
What has changed in Jelly Bean? How do I make the cursor visible?
Edit:
android:cursorVisible="true"
isn't helping.
Removing
android:textIsSelectable="true
(text is selectable even without this)
and adding
android:textCursorDrawable="@null"
fixed the issue.
In Jellybeans
, it happens if you set background to editText
.
To show cursor in editText
, just use android:textCursorDrawable="@null" and android:textColor="@color/someColor"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With