I want to highlight a specific (searching) text on WebView. I use the code
myWebView.findAll(txtSearch);
try {
for (Method m : WebView.class.getDeclaredMethods()) {
if (m.getName().equals("setFindIsUp")) {
m.setAccessible(true);
m.invoke(myWebView, true);
break;
}
}
} catch (Exception ignored) {
}
This works great on Android 2.2, but it doesn’t work on Android 4.0 and above
Yes, you are right, highlight text on WebView works great on Android 2.2, but he appeared as not working on Android 4.0 and above
look at this link
here