Example usage for android.webkit WebView findAllAsync

List of usage examples for android.webkit WebView findAllAsync

Introduction

In this page you can find the example usage for android.webkit WebView findAllAsync.

Prototype

public void findAllAsync(String find) 

Source Link

Document

Finds all instances of find on the page and highlights them, asynchronously.

Usage

From source file:com.ywesee.amiko.MainActivity.java

@TargetApi(16)
void findAll(String key, WebView webView) {
    if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
        webView.findAllAsync(key);
        try {//  w w w . j  a va  2  s .  c o  m
            Method m = WebView.class.getMethod("setFindIsUp", Boolean.TYPE);
            m.setAccessible(true);
            m.invoke(webView, true);
        } catch (Exception ignored) {
            // Exception is ignored
        }
    }
}