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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -