JQTouch android webView配置
我正在开发一个应用程序,主要是一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决此问题的方法是重写 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.