Android softkeyboard not triggerring -
Android softkeyboard not triggerring -
i have multiple edittext on screen , 1 of them focussed. softkeyboard not trigger screen pops up. want soft keyboard trigger screen pops up. works if don't implement onfocuschangelistener(). need onfocuschangelistener() observe edittext focused. have tried setting setfocusable(true) , setfocusableintouchmode(true). don't want modify android:windowsoftinputmode property in androidmenifest.xml. have next criteria :
onfocuschangelistener implemented (to observe edittext focused) no modifications in androidmenifest.xmlhere code snippet
final inputmethodmanager inputmethodmanager = (inputmethodmanager) getcontext().getsystemservice(context.input_method_service); minput.setonfocuschangelistener(new onfocuschangelistener() { @override public void onfocuschange(view view, boolean hasfocus) { misfocused = hasfocus; if(hasfocus) inputmethodmanager.showsoftinput(minput, inputmethodmanager.show_implicit); } });
any suggestions ?
you can open softkeyboard programmatically
getactivity().getwindow().setsoftinputmode(windowmanager.layoutparams.soft_input_state_always_visible);
android android-edittext
Comments
Post a Comment