java - Bind a onKeyDown to a particular webview android -


hey working on implementing key functionality webviews. have got working given code problem need work 3 different webviews none conflict each other , cause crash, far works each 1 singly @ time. guess need bind keylistener particular webview unsure how. here code using youtube view example..

@override public boolean onkeydown(int keycode, keyevent event) {      wv_yt = (webview) findviewbyid(r.id.web_youtube);      if (event.getaction() == keyevent.action_down) {         switch (keycode) {         case keyevent.keycode_back:             if (wv_yt.cangoback() == true) {                 wv_yt.goback();              } else {                 finish();             }             return true;          }      }     return super.onkeydown(keycode, event); } 


Comments