JQTouch android webView配置

发布于 2024-08-29 14:51:20 字数 317 浏览 1 评论 0原文

我正在开发一个应用程序,主要是一个 webview 并将显示 JQTouch UI。三个视图中的两个工作得很好,但是,我有一个视图加载了另一个页面,其中的表单根本不起作用。该视图加载得很好,但是当我单击链接转到表单时,链接只是保持突出显示状态,没有任何反应。我已经重写了 webviewclient 和 webchromeclient 中的所有方法,并在其中放置了断点,但没有成功。当我点击链接时,没有一个钩子被钩住。

真正让我感到困惑的是它在手机浏览器中工作,但在我的网络视图中不起作用。我可能缺少 webview 上的某个设置,使其像手机浏览器一样运行吗?

任何帮助或建议将不胜感激。

I'm developing an application which is mainly a webview and will display a JQTouch UI. Two of the 3 views work just fine, however, I have a view which loads another page with a form which does not work at all. This view loads up just fine but when I click the link to go to the form the link just stays highlighted and nothing happens. I have overriden all of the methods in webviewclient and webchromeclient and placed breakpoints within with no luck. None of the hooks catch when I click the links.

The part that truly confounds me is that it works in the phones browser but not in my webview. Is there a setting on webview that I may be missing which would make it act like the phones browser?

Any help or suggestions would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

颜漓半夏 2024-09-05 14:51:21

解决此问题的方法是重写 onLoadResource,因为链接被视为资源而不是新页面加载。我尝试在 loadREsource 的重写中直接调用 webView.loadUrl 但这导致了无限循环,所以我必须编写一些逻辑来将 url 正确加载到我的 webView 中。这看起来有点被黑,但它确实有效。

The fix for this was to override onLoadResource as the link was being treated as a resource and not a new page load. I tried calling webView.loadUrl right in the override of loadREsource but that caused an endless loop so I had to write some logic to load the url properly into my webView. This seems a bit hacked but it works.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文