Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid Webview loading responsive-design site, but webview is not resizing correctly
    primarykey
    data
    text
    <p>I have read all of the related questions to this, and all recommendations are implemented in my code as you can see, but the site still is not rendering correctly. I am fairly certain it has to do with device dpi. The device I am testing with is a Google Nexus 7 with a xhdpi, here are its specs:</p> <blockquote> <p>7.02" 1920x1200 HD display (323 ppi); 1080p HD IPS</p> </blockquote> <p>The page should automatically switch to single column view, but instead displays as if on a very large screen (thus making buttons too small). Here is code:</p> <p>Site:</p> <pre><code>&lt;meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, target-densitydpi=device-dpi" /&gt; </code></pre> <p>Java:</p> <pre><code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); WebView webView = (WebView) findViewById(R.id.webview); webView.getSettings().setJavaScriptEnabled(true); webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); webView.getSettings().setUserAgentString("Android App"); webView.setInitialScale(30); webView.getSettings().setLoadWithOverviewMode(true); webView.getSettings().setUseWideViewPort(true); webView.setWebViewClient(new WHMWebViewClient(this)); webView.loadUrl("http://www.responsive_website.com"); } </code></pre> <p>Android 4.3</p> <p>As I am fairly sure it is dpi related (the physical screen should show the mobile layout, but the dpi makes the site think it isn't a mobile screen), what options do I have? My first preference would be to make adjustments device-side since I am developing the app for an existing site I don't own. If this isn't possible, what adjustments would need to be made in the site? Note that browsers such as Chrome and FFox are able to display the site properly.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload