多的WebView或电流的WebView? [英] Multiple webview or current webview?

查看:193
本文介绍了多的WebView或电流的WebView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。:D我在Android的新的

Hi all :D I'm new in android.

在我的WebView打开的应用我看到第一页(index.html的),但是当我Page2上单击(index2.html)我看到的第二页。现在,此多的WebView或电流的WebView ...

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...

上的图片查看:
http://oi57.tinypic.com/282jedv.jpg

我做出这样的 webview.loadUrl(文件:///android_asset/index.html);

在index.html的,我做固定的酒吧,在同一帧 HTTP打开链接:// I60 .tinypic.com / mb20s1.png

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

当你点击第二页(index2.html)开放index2.html从的file:/// android_asset / ...但你点击第一页(索引时。 HTML)打开index.html形式的file:/// android_asset /

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/

推荐答案

覆盖webviewclient这个方法:shouldOverrideUrlLoading(),使每一个环节都在同一个web视图,并在同一个选项卡中打开

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

希望这会帮助你。

感谢您。

这篇关于多的WebView或电流的WebView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆