Show/Hide Android keyboard having connected an usb keyboard -
Show/Hide Android keyboard having connected an usb keyboard -
on activity have 2 edittext. 1 must not show android keyboard , other must show it. have tried implement next code show keyboard:
edittext txtname = (edittext) findviewbyid(r.id.txtname); inputmethodmanager inputmethodmanager = (inputmethodmanager) getsystemservice(context.input_method_service); inputmethodmanager.showsoftinput(txtname, inputmethodmanager.show_implicit);
also have tried lot of other examples found.
try this:
inputmethodmanager imm = (inputmethodmanager)this.getsystemservice(service.input_method_service);
for show:
imm.showsoftinput(ed, 0);
for hide
imm.hidesoftinputfromwindow(ed.getwindowtoken(), 0);
android keyboard
Comments
Post a Comment