Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

高清方案在android的系统webView中没有起作用 #692

Closed
Sdoy opened this issue Dec 30, 2016 · 2 comments
Closed

高清方案在android的系统webView中没有起作用 #692

Sdoy opened this issue Dec 30, 2016 · 2 comments

Comments

@Sdoy
Copy link

Sdoy commented Dec 30, 2016

本地环境

  • antd-mobile 版本:0.9.12
  • 浏览器 (或标明是 react-native) 及其版本:安卓6.0 webview
  • 运行环境及其版本:模拟器

你做了什么?

使用高清方案

你期待的结果是:

页面正确缩放

实际上的结果:

meta标签似乎没有在安卓的webview上起作用

可重现的在线演示

webview访问的url:(http://m.test5.laobai.com/grouppurchase/detail/?orderNo=9945393368643482)

image

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        WebView webView = (WebView) findViewById(R.id.wb);
        webView.setWebViewClient(new WebViewClient());
        webView.getSettings().setJavaScriptEnabled(true);
        webView.setWebChromeClient(new WebChromeClient());
        webView.loadUrl("http://m.test5.laobai.com/grouppurchase/detail/?orderNo=9945393368643482");
    }
}

image

@warmhug
Copy link
Contributor

warmhug commented Jan 3, 2017

Java 代码少了设置,加上webView.getSettings().setUseWideViewPort(true);

@lock
Copy link

lock bot commented May 28, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants