Android的web视图与奇巧4.4 [英] Android Webview with KitKat 4.4

查看:67
本文介绍了Android的web视图与奇巧4.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想端口使用奇巧4.4网站到Android平板。

 的WebView vendWebView =(web视图)findViewById(R.id.webview);
WebSettings webSettings = vendWebView.getSettings();
//启用JavaScript
webSettings.setJavaScriptEnabled(真正的);


vendWebView.setWebViewClient(新WebViewClient());
vendWebView.loadUrl(https://xxxxxxx.xxxxxx.com/);
 

该网站的作品在Chrome浏览器上,但不是所有的HTML作品在Android上的Chrome网络浏览器。如果网站可以从Chrome浏览器的PC浏览器的Andr​​oid浏览器的便携式。

 谢谢
 

这是不工作在Android浏览器,但工程一台PC的Chrome浏览器上的特定HTML是 -

        

 < D​​IV ID =快键级=卖>
        < D​​IV ID =菜单中的类=快捷键菜单>
            < UL>< / UL>
        < / DIV>
        < D​​IV ID =清单>
            < UL>< / UL>
        < / DIV>
        < D​​IV ID =页面>
            < UL>< / UL>
            < A HREF =#$ P $光伏ID =页面级previous><我类=图标快速键,pagination- previous>< / I> &所述; / a取代;
            &所述; A HREF =#下一ID =页面下>&所述; I类=图标快速键-分页-下>&所述; / I>&所述; / a取代;
        < / DIV>
        < D​​IV ID =快捷键,默认情况下>
            < D​​IV CLASS =快捷键菜单>
                < UL>
                    <李风格=宽度:516px;>
                        < A HREF =/设置/ quick_keys>快速键< / A> < /李>
                < / UL>
            < / DIV>
            < D​​IV CLASS =条纹框>
                < A HREF =/设置/ quick_keys级=BTN BTN  - 主要BTN  - 大BTN  - 以及快速键号召行动ALT =设置你的快捷键>设置快速键与LT; / A>
                < P>快速键让你配置的按钮组成的格子; BR />快速添加产品销售和LT; / P>
            < / DIV>
        < / DIV>
    < / DIV>
< / DIV>
 

解决方案

你有没有见过的迁移WebViews 4.4

有一个编号,以web视图处理变化4.4的,有一点可能是<一个href="http://developer.android.com/reference/android/webkit/WebView.html#setWebContentsDebuggingEnabled%28boolean%29"相对=nofollow> setWebContentDebuggingEnabled ,看到什么的WebView实际接收。

请问web视图工作预计在previous版本?

(对不起,我想使这个评论,但我会失去了很多的格式)

I am trying to port a website to an Android Tablet using KitKat 4.4.

WebView vendWebView = (WebView) findViewById(R.id.webview);
WebSettings webSettings = vendWebView.getSettings();
// Enable JavaScript
webSettings.setJavaScriptEnabled(true);


vendWebView.setWebViewClient(new WebViewClient());
vendWebView.loadUrl("https://xxxxxxx.xxxxxx.com/");

The website works on a Chrome browser but not all of the HTML works on the Android Chrome web browser. Should the website be portable from the Chrome PC browser to the Android browser.

                              Thanks

The specific HTML that is not working on the Android browser but works on a PC Chrome browser is -

    <div id="quick-keys" class="sell">
        <div id="menu" class="quick-key-menu">
            <ul></ul>
        </div>
        <div id="list">
            <ul></ul>
        </div>
        <div id="pages">
            <ul></ul>
            <a href="#prev" id="page-previous"><i class="icon-quick-keys-pagination-previous"></i></a>
            <a href="#next" id="page-next"><i class="icon-quick-keys-pagination-next"></i></a>
        </div>
        <div id="quick-key-default">
            <div class="quick-key-menu">
                <ul>
                    <li style="width: 516px;">
                        <a href="/setup/quick_keys">Quick Keys</a>                        </li>
                </ul>
            </div>
            <div class="striped-box">
                <a href="/setup/quick_keys" class="btn btn--primary btn--large btn--well quick-key-call-to-action" alt="Set up your Quick Keys">Set Up Quick Keys</a>
                <p>Quick Keys let you configure a grid of buttons <br />to quickly add products to a sale.</p>
            </div>
        </div>
    </div>
</div>

解决方案

Have you seen the page for migrating WebViews to 4.4?

There are a number of changes in 4.4 to WebView handling, one thing may be to setWebContentDebuggingEnabled and seeing what the WebView is actually receiving.

Does the WebView work as expected in previous versions?

(Sorry I wanted to make this a comment but I would have lost a lot of formatting)

这篇关于Android的web视图与奇巧4.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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