Android 搜索文本并为Web视图使用setFindListener
我想在WebView中搜索文本。 当搜索结束时。 如果webView中的文本为“是”; 如果不是,请说“不”。 我使用以下代码:Android 搜索文本并为Web视图使用setFindListener,android,Android,我想在WebView中搜索文本。 当搜索结束时。 如果webView中的文本为“是”; 如果不是,请说“不”。 我使用以下代码: int API = android.os.Build.VERSION.SDK_INT; if(API < 16) { DeleteAccount.web.findAll("Sorry, too many tries"); } else { DeleteAccount.web.findAllAsync("Sorry, too m
int API = android.os.Build.VERSION.SDK_INT;
if(API < 16) {
DeleteAccount.web.findAll("Sorry, too many tries");
}
else {
DeleteAccount.web.findAllAsync("Sorry, too many tries");
}
DeleteAccount. web.setFindListener(new FindListener() {
@Override
public void onFindResultReceived(int activeMatchOrdinal, int number_match, boolean isDoneCounting) {
if(number_match!=0)
Toast.makeText(base_context, "yes", Toast.LENGTH_LONG).show();
else
//....
});
我认为他们不理解API 16中的以下方法
web.setFindListener....
web.setFindListener....