title: Error: Android-XML:Placing a <WebView> in a parent element that uses a wrap_content size can lead to subtle bugs; use match_parent
body: <p>I am a beginner in Android and building a <code>linear layout</code> and getting an error in the layout XML file like this,</p>
  
  <p><strong>Error</strong></p>
  
  <pre><code> Placing a &lt;WebView&gt; in a parent element that uses a wrap_content size can lead to subtle bugs; use match_parent
  </code></pre>
  
  <p>Error is shown in this part of the code</p>
  
  <pre><code>&lt;WebView 
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/browse"
          /&gt;
  </code></pre>
  
  <p>Here is my full code of the XML file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal"
          android:weightSum="100" &gt;
  
          &lt;EditText
              android:id="@+id/url"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="70"
              android:ems="10" &gt;
          &lt;/EditText&gt;
  
          &lt;Button
              android:id="@+id/go"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="30"
              android:text="GO" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
           android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:orientation="horizontal"
           android:weightSum="8"
  
          &gt;
      &lt;Button
          android:id="@+id/backpage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:text="Go Back" /&gt;
  
      &lt;Button
          android:id="@+id/forwardpage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:text="Forward Page" /&gt;
  
      &lt;Button
          android:id="@+id/Refreshpage"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:text="Refresh Page" /&gt;
  
      &lt;Button
          android:id="@+id/clearhistory"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:layout_weight="2"
          android:text="Clear History" /&gt;
  
  &lt;/LinearLayout&gt;
  
      &lt;WebView 
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:id="@+id/browse"
          /&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Can anyone tell me what is wrong in my code and how can I get rid of the error ?</p>
  
  <p>I think this might be a very basic question but I tried and could not figure it out.</p>
  
  <p>Details:</p>
  
  <p>API Level : <code>API 19: Android 4.2.2</code></p>