Android Hide keayboard on Done button click inside a webview in actvity -


i have activity webview inside.

when click inside text input in html page displayed, keyboard shows. there real time search/filter when typing inside text input.

then wand hide keyboard, when done button or arrow tapped.

i've tryed add :

public boolean onkeydown (int keycode, keyevent event) {..} 

or

mwebview.setonkeylistener(new view.onkeylistener(){         @override         public boolean onkey(view v, int keycode, keyevent event) {..} 

but none of function works. how can implement ?

maybe should try override onkey , try this:

public boolean onkey(view v, int keycode, keyevent event) {  if (keycode == keyevent.keycode_enter && event.getaction() == keyevent.action_down){   //todo }  return false;  } 

dont forgett implement view.onkeylistener


Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -