I have an edittext and a button in my layout and in my code I’m setting keyListener of the edittext as null
editText.setKeyListener(null);
so that I cannot type into my edittext. Now on my button click I should be able to type into my ediitext. How can I do that. It’s a simple problem, but I’m not able to find any solution. Any help would be much appreciated.
I’m probably late now but, this is the way I do it:
Basically, you first save the EditText‘s default KeyListener before you call
setKeyListener(null). Then, when you click your button, you callsetKeyListeneragain, passing the default listener you previously saved.