Lost focus edit text android -
i have code lost focus edit text, if edittext on focus, value in edittext can not edit , keyboard not show, please me, thanks.
etkolom1.setonfocuschangelistener(new view.onfocuschangelistener() { @override public void onfocuschange(view view, boolean hasfocus) { if (etkolom1.requestfocus()){ getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_always_visible); if(!hasfocus){ string = etkolom1.gettext().tostring(); boolean boo1 = ceket(etkolom1, "i", "8i"); if(etkolom1.requestfocus()){ getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_always_visible); } } } } });
you can use hide keyboard
inputmethodmanager inputmanager = (inputmethodmanager) getsystemservice(context.input_method_service); inputmanager.hidesoftinputfromwindow(getcurrentfocus().getwindowtoken(), inputmethodmanager.hide_not_always);
Comments
Post a Comment