List of usage examples for android.webkit WebView setFindListener
public void setFindListener(FindListener listener)
From source file:com.ywesee.amiko.MainActivity.java
@TargetApi(16) void setFindListener(final WebView webView) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) { webView.setFindListener(new FindListener() { @Override//w w w. j a v a2 s .c om public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches, boolean isDoneCounting) { // Update hits counter if (isDoneCounting) { if (activeMatchOrdinal < numberOfMatches) { mSearchHitsCntView.setVisibility(View.VISIBLE); mSearchHitsCntView.setText((activeMatchOrdinal + 1) + "/" + numberOfMatches); } else { mSearchHitsCntView.setVisibility(View.GONE); webView.clearMatches(); } } } }); } }