I develop keyboard using EditText and Button. When you click on the button, the text field is filled with the corresponding letter. I made the field inactive so that no other letters could be entered, but at the same time the text can be selected and copied.

android:enabled="false" android:textIsSelectable="true" 

However, with this code, the cursor disappears. And I need it to remain visible in order to know from which place you can erase or add text. How can I make the cursor visible?

  • Usually, listeners are used to react to events and, if necessary, cancel them. I looked for your problem a little, look at this question by reference, it may be useful (the author was looking for a way to track backspace pressing, but it turned out that the listener is called only with a hardware keyboard, the answers have workarounds for this problem): stackoverflow.com / questions / 4886858 / ... - therainycat
  • I need that the blinking cursor never disappeared, and with these solutions it disappears all the same and never appears. - Hayk Abelyan Sep.

0