Android 2.2的web视图搜索问题 [英] Android 2.2 webview search problem

查看:148
本文介绍了Android 2.2的web视图搜索问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在活动一web视图。现在,当我使用 WebView.findAll()方法中的WebView搜索文本它不突出匹配的单词。

I have a webview in my activity. Now when I use WebView.findAll() method to search text in webview it is not highlighting the matching words.

它工作正常,在Android 1.6的,但不是工作在2.2。

It works fine in Android 1.6 but is not working in 2.2.

推荐答案

目前在这个Android的问题跟踪一个问题:<一href="http://$c$c.google.com/p/android/issues/detail?id=9018">http://$c$c.google.com/p/android/issues/detail?id=9018

There is an issue in Android issue tracker about this: http://code.google.com/p/android/issues/detail?id=9018

我放在这之后code右键 WebView.findAll(),这使突出的工作:

I placed this code right after WebView.findAll(), and it made highlighting working:

try
{
    Method m = WebView.class.getMethod("setFindIsUp", Boolean.TYPE);
    m.invoke(webView, true);
}
catch (Throwable ignored){}

这篇关于Android 2.2的web视图搜索问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆