title: Webview not showing content properly
body: <p>Im haveing small problem.
  While i am trying to open a url inside webview the contents are not showing up.
  if i try this on my computer it does work.</p>
  
  <p>the result on my pc is like this(sorry for blurring, but you can still see that there are some text.) ; </p>
  
  <p><img src="https://i.stack.imgur.com/X7Y7W.png" alt="enter image description here"></p>
  
  <p>and then my device </p>
  
  <p><img src="https://i.stack.imgur.com/TrKKF.png" alt="enter image description here"></p>
  
  <p>as you can see there is only a small white part on the device but thats it, noting much is loading after this.</p>
  
  <p>the full code ;</p>
  
  <pre><code>package com.example.[removed];
  
  import android.os.Bundle;
  import android.app.Activity;
  import android.content.Intent;
  import android.view.Menu;
  import android.view.View;
  import android.view.Window;
  import android.webkit.WebSettings;
  import android.view.WindowManager;
  import android.webkit.WebView;
  import android.webkit.WebViewClient;
  import android.widget.RelativeLayout;
  
  public class WebViewAct extends Activity {
  @Override
  protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.activity_web_view);
      WebView mYWeb = (WebView) findViewById(R.id.webView1);
      mYWeb.getSettings().setJavaScriptEnabled(true);
      mYWeb.getSettings().setBuiltInZoomControls(true);
      mYWeb.getSettings().setSupportZoom(true);
      mYWeb.getSettings().setLoadWithOverviewMode(true);
      mYWeb.getSettings().setUseWideViewPort(true);
      mYWeb.setScrollBarStyle(0);
      mYWeb.setWebViewClient(new WebViewClient());
      mYWeb.setLayerType(View.LAYER_TYPE_SOFTWARE, null);
      mYWeb.loadUrl("http://IP/Filename.html");
  }
  
  @Override
  public boolean onCreateOptionsMenu(Menu menu) {
      // Inflate the menu; this adds items to the action bar if it is present.
      getMenuInflater().inflate(R.menu.web_view, menu);
      return true;
  }
  
  }
  </code></pre>
  
  <p>any help will be great!
  PS: I found out that it shows the content in Firefox and Chrome even worse, but in chrome, if i swtich to ''Request desktop site everhting works like charm!''
  so if possible can i make webView show as Desktop mode as default?</p>
  
  <p>EDIT:</p>
  
  <p>Problem fixed.
  I added <code>mYWeb.getSettings().setUserAgentString(ua);</code>and after that i made a String with the following text inside of it: <code>String ua =  "Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.4) Gecko/20100101 Firefox/4.0";</code></p>
  
  <p>and everything worked perfect after that!
  i maybe asked this quastion too fast, sorry :)</p>