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

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

php - HTTP_REFERER woes: How can I allow access to a specific page, only when a visitor has visited another specific page beforehand? -