chrome - android webview 如何像浏览器一样新加载一个webview?类似网页选项卡?
阿神
阿神 2017-04-17 15:39:36
0
1
409

我在activity 里加载了个webview,然后加载了一个主页,主页里的链接点击之后还是在这个webview里面跳转,我想新建一个webview跳转,就像浏览器一样,这应该怎么弄?

因为主页很多数据都是ajax加载的,如果被点击后,跳转再返回的话,AJAX加载的内容又要重头加载这样不行,所以非要新建一个webview但是网上没有类似教程,希望大神指点一下

阿神
阿神

闭关修行中......

reply all(1)
巴扎黑

You have to make the browser's page card function yourself. As for not jumping after clicking, you need to rewrite `web_content.setWebViewClient(new WebViewClient() {

        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            return false;
        }
    });`的这个方法

There will be a URL in it, and then you pass the URL to another WebView to load it. As for how the other WebView displays it, it depends on you.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template