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

Popular posts from this blog

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -

firemonkey - How do I make a beep sound in Android using Delphi and the API? -