Android webview: highlight a specific word in a page using javascript?

前端 未结 4 1882
暖寄归人
暖寄归人 2020-12-09 07:24

i am using a webview inside my android application. I would like to know if it is possible to highlight or underline a specific word/sentence/paragraph in a loaded page usin

4条回答
  •  情话喂你
    2020-12-09 07:58

    Code

    Method m = WebView.class.getMethod("setFindIsUp", Boolean.TYPE);
    m.invoke(titleWebView, true);
    

    After this test using following code.

    findAll("search text")
    

    When text is match Toast display.

提交回复
热议问题