Multiple webview or current webview?

a 夏天 提交于 2019-12-25 01:46:23

问题


Hi all :D I'm new in android.

When I open application in webview I see Page1 (index.html), but when I click on Page2(index2.html) I see Page2. Now are this multiple webview or current webview...

See on image: http://oi57.tinypic.com/282jedv.jpg

I'm make like this webview.loadUrl("file:///android_asset/index.html");

In index.html I'm make fixed bar with open links in the same frame http://i60.tinypic.com/mb20s1.png

When you click on page2 (index2.html) open index2.html from file:///android_asset/... but when you click on Page1 (index.html) open index.html form file:///android_asset/


回答1:


override this method of webviewclient : shouldOverrideUrlLoading() so that every link opens in the same webview and in the same tab.

Hope this will help you.

Thank you.



来源:https://stackoverflow.com/questions/25858633/multiple-webview-or-current-webview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!