Android: textView doesn’t show cursor


I have a textView which is configured as an EditText. But the problem is that the cursor doesn't appear when i'm pressing keys (text is written correctly).


Best Solution

Well the first thing I'd try is setCursorVisible(true)

Also you say you have a TextView which is configured as an EditText. That's a bit confusing to me. Did you define it in your layout XML as <EditText> or create a new EditText object via new EditText(context)? Or did you define it as a <TextView> with android:editable="true"? Your wording sounds almost like you did the later, but I'm not sure that's going to work as well as the former.

For future reference, posting the code that's not working as part of your question really helps people pinpoint your problem and provide you the correct answer.