开发者

Android links not working in a webview

开发者 https://www.devze.com 2023-03-14 21:41 出处:网络
Basically I\'m parsing the HTML of a web page and then loading it into a webview via a string using \"loadData\". My problem is this stops my links working, the webview doesn\'t know the current URL o

Basically I'm parsing the HTML of a web page and then loading it into a webview via a string using "loadData". My problem is this stops my links working, the webview doesn't know the current URL of the page so when a link is clicked rather than loading http://myurl.com/page.html it tries to load http://page.html which clearly doesn't load.

Does a开发者_JAVA技巧nyone know how to solve this problem without editing the HTML pages?


http://developer.android.com/reference/android/webkit/WebView.html#loadDataWithBaseURL(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String)

0

精彩评论

暂无评论...
验证码 换一张
取 消