开发者

Call a webview inside another webview in android?

I have a custom html(suppose a.html) file which i am using from the resources and thus building a string with the entire document which is then passed to the WebView.

There's some text in a.html on click of which i want load ano开发者_Python百科ther file b.html in the webview itself.

Please let me know what is the apporach to be followed here.


Step #1: Implement a WebViewClient, overriding shouldOverrideURLLoading().

Step #2: In shouldOverrideURLLoading(), load what you want -- this will be called on link clicks and redirects, and you are supplied the URL that ordinarily would be loaded.


I think if you set a WebViewClient and override shouldOverrideUrlLoading() then you can have the link loaded into the current WebView by returning false.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜