title: Android custom dialog layout doesn't work
body: <p>I don't understand why my dialog layout behaves strange. If I use <code>android:layout="wrap_content"</code> for the last widget, It makes the dialog very narrow.</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="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical"
      android:padding="20dp"&gt;
  
      &lt;TextView 
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam bibendum leo eget eros mattis nec eleifend nulla elementum. Suspendisse suscipit suscipit enim in mollis. "    
      /&gt;
  
      &lt;CheckBox 
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Don't remind me later"    
      /&gt;
  
      &lt;Button 
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:text="Button"    
      /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>Java code.</p>
  
  <pre><code>private void showDialog() {
      Dialog dialog = new Dialog(this);
      dialog.setContentView(R.layout.dial);
      dialog.setTitle("Dialog title");
      dialog.show();
  }
  </code></pre>