0

Standard software keyboard which is shown for any focused EditText takes too much space. I have to create my own built-in software keyboard right in the app and i need to prevent default software keyboard shown for the control. I'm using editor.setInputType(InputType.TYPE_NULL) but cursor is hidden too.

How to prevent software keyboard shown but with cursor visible?

4ntoine
  • 19,816
  • 21
  • 96
  • 220
  • Does this help you in any way? I am not into android but this is what had helped me once. http://stackoverflow.com/questions/13586354/android-hide-soft-keyboard-from-edittext-while-not-losing-cursor – Gaurav Deochakke May 13 '14 at 09:51
  • The Question is a duplicate of [http://stackoverflow.com/q/13586354/7550472](http://stackoverflow.com/q/13586354/7550472). The answer to this is to set the flag `textIsSelectable` in EditText to **true**. For more detail, check the detailed answer here : http://stackoverflow.com/a/42180201/7550472 – Kaushik NP Feb 11 '17 at 20:02
  • Possible duplicate of [Android Hide Soft Keyboard from EditText while not losing cursor](http://stackoverflow.com/questions/13586354/android-hide-soft-keyboard-from-edittext-while-not-losing-cursor) – Kaushik NP Feb 12 '17 at 18:55

2 Answers2

0

To prevent the software keyboard shown , you could include android:windowSoftInputMode="stateHidden" in your project's AndroidManifest.xml within activity tag in which you would want to hide the keyboard.

sugra
  • 73
  • 1
  • 6
0

You can make cursor visible using editText.setCursorVisible(true) method.

Vipul J
  • 6,641
  • 9
  • 46
  • 61
  • cursor is now showing even if `setCursorVisible(true)` after 'setInputType(InputType.TYPE_NULL)' – 4ntoine May 13 '14 at 10:54