mejkan
mejkan

Reputation: 87

Why webview content not fit to screen (Responsive) to every devices?

here i am using webview but content of webview fit on some devices fine but in some devices not ,so what i am missing here

  final ProgressDialog pd = ProgressDialog.show(Webview.this, "Please    while wait", "Loading...", true);
        pd.setCancelable(true);

        WebView webview= (WebView) findViewById(R.id.webViewID);


        webview.getSettings().setJavaScriptEnabled(true);
        webview.getSettings().setPluginState(PluginState.ON);

        webview.getSettings().setJavaScriptEnabled(true);

        webview.setWebViewClient(new WebViewClient());

    //webview.loadData(content, "text/html", "UTF-8");
        webview.loadUrl("http://hop.betfanplus.com/10000/0/mega4");

Upvotes: 0

Views: 670

Answers (2)

sajid Hussain
sajid Hussain

Reputation: 385

you should try add this for fit screen with zoom.

webview.setInitialScale(1);

Upvotes: 1

Alberto Alegria
Alberto Alegria

Reputation: 1060

Can you post your layout file? Please check if your WebView layout_width and layout_height are equals to match_parent. Also check if your web page is truly responsive.

Upvotes: 0

Related Questions