I am using webview
to load the responsive website but it shows the width outside to the mobile size.
I open the link in a mobile Chrome browser and it looks
May be you can achieve with onPageFinished()
method
@Override
public void onPageFinished(android.webkit.WebView view, String url)
{
super.onPageFinished(view, url);
WindowManager manager = (WindowManager) getContext().getSystemService(Context.WINDOW_SERVICE);
DisplayMetrics metrics = new DisplayMetrics();
manager.getDefaultDisplay().getMetrics(metrics);
metrics.widthPixels /= metrics.density;
wb.loadUrl("javascript:document.body.style.zoom = "+String.valueOf(scale)+";");
OR//
wb.loadUrl("javascript:var scale = " + metrics.widthPixels + " / document.body.scrollWidth; document.body.style.zoom = scale;");
}
it worked fine with me time ago. Hope this helps...