How to display the soft keyboard only on the click event of edittext in android? -
my android activity
has edittext
. whenever screen loads soft keyboard automatically pops up. obscures visibility of screen. want display soft keyboard on click event of edittext
.
how can this?
in code got this:
inputmethodmanager imm = (inputmethodmanager)getsystemservice(context.input_method_service); imm.hidesoftinputfromwindow(password.getwindowtoken(), 0); imm.hidesoftinputfromwindow(username.getwindowtoken(), 0);
where password , username textedit views. , show:
imm.showsoftinputfromwindow(username.getwindowtoken(), 0);
Comments
Post a Comment