Android : Android Webview - Screen width

on Monday, November 3, 2014


I am using Webview to display my web page. I am not sure where problem is, but it seems that page width is calculated not correctly. All images are resized very small and Facebook login window doesn't fit. Here is my code:



protected void onCreate(Bundle bundle)
{
super.onCreate(bundle);
setContentView(0x7f030018);
pd = new ProgressDialog(this);
WebView webview = (WebView)findViewById(0x7f05003c);
webview.getSettings().setJavaScriptEnabled(true);
webview.getSettings().setAppCacheEnabled(true);
webview.getSettings().setLoadWithOverviewMode(true);
webview.getSettings().setUseWideViewPort(true);
webview.getSettings().setUserAgentString("android");
webview.setWebViewClient(myWebClient);
webview.loadUrl("http://m.mywebpage.com");
}


And here is two screens from android app:


enter image description here


enter image description here


And here is screen from original web page:


enter image description here


0 comments:

Post a Comment