本文整理了Java中android.webkit.WebView.setFindListener()
方法的一些代码示例,展示了WebView.setFindListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WebView.setFindListener()
方法的具体详情如下:
包路径:android.webkit.WebView
类名称:WebView
方法名:setFindListener
暂无
代码示例来源:origin: luili16/UIMocker
@Override
public void setFindListener(Object listener) {
mWebView.setFindListener((WebView.FindListener) listener);
}
代码示例来源:origin: LineageOS/android_packages_apps_Jelly
public SearchBarController(WebView webView, EditText editor, TextView status,
ImageButton prevButton, ImageButton nextButton,
ImageButton cancelButton, OnCancelListener listener) {
mWebView = webView;
mEditor = editor;
mStatus = status;
mNextButton = nextButton;
mPrevButton = prevButton;
mCancelButton = cancelButton;
mListener = listener;
mEditor.addTextChangedListener(this);
mEditor.setOnEditorActionListener(this);
mWebView.setFindListener(this);
mPrevButton.setOnClickListener(this);
mNextButton.setOnClickListener(this);
mCancelButton.setOnClickListener(this);
}
代码示例来源:origin: bkhezry/ExtraWebView
private void findInPage() {
String query = mEditText.getText().toString().trim();
if (TextUtils.isEmpty(query)) {
return;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
mWebView.setFindListener(new WebView.FindListener() {
@Override
public void onFindResultReceived(int activeMatchOrdinal, int numberOfMatches, boolean isDoneCounting) {
if (isDoneCounting) {
handleFindResults(numberOfMatches);
}
}
});
mWebView.findAllAsync(query);
} else {
//noinspection deprecation
handleFindResults(mWebView.findAll(query));
}
}
内容来源于网络,如有侵权,请联系作者删除!