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)typewebviewdeprecated
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
Post a Comment