My activity has an EditText which is supposedly not editable until user clicks on edit button for the screen.
EditText
I did edit.setEnabled(false)
edit.setEnabled(false)
Attention that setEditable is depecrated.
setEditable
You can use :
setInputType(EditorInfo.TYPE_CLASS_TEXT)
To turn keyboard on.
setInputType(EditorInfo.TYPE_NULL)
To turn keyboard off.