Multiple webview or current webview?

2019-09-17 06:20发布

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条回答
可以哭但决不认输i
2楼-- · 2019-09-17 06:45

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.

查看更多
登录 后发表回答