highlight search word in webview android 4.0.4 -
i have lot of search in google still didn't solutions questions .the below code working android2.3 , 4.3.but code not work in android 4.0.4
webview.findnext(true); int i=webview.findall(strr); toast.maketext(getapplicationcontext(), "found "+i+" results !", toast.length_short).show(); try{ method m = webview.class.getmethod("setfindisup", boolean.type); m.invoke(webview, true); log.e("click func clicked:","func clicked:"); }catch(exception ignored){}
so,anyone give me suggestion problem..
advance in thanks....
this highlighting search text method android 4.0.4
string strr=search_text.gettext().tostring(); webview web=(webview)findviewbyid(r.id.webview); web.findall(strr); try { (method m : webview.class.getdeclaredmethods()) { if (m.getname().equals("setfindisup")) { m.setaccessible(true); m.invoke((web), true); break; } } } catch (exception ignored) { }
Comments
Post a Comment