mejkan mejkan - 5 months ago 43
Android Question

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");

Answer

you should try add this for fit screen with zoom.

webview.setInitialScale(1);