android - search text within a webView doesn't work -


i'm using this code search words within in textview. buttons , edittext displayed don't work. in code there warning says

the method findall(string) type webview deprecated

for line

wv.findall(findbox.gettext().tostring());

the rest of code in this link.

use

wv.findall(findbox.gettext().tostring()); 

for api versions < 16 , use

wv.findallasync(findbox.gettext().tostring()); 

for api versions > 16.

use following code ensure code works on versions:

int api = android.os.build.version.sdk_int; if(api < 16) {     wv.findall(findbox.gettext().tostring()); } else {     wv.findallasync(findbox.gettext().tostring()); } 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -