title: Dialog window is not wraping content
body: <p>I have simple <code>RelativeLayout</code> with <code>wrap_content</code> width and height. But it does not wrap it. Maybe I miss something.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:background="@color/Wheat"&gt;
  
      &lt;LinearLayout
          android:id="@+id/btn_layout"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal"
          android:layout_alignParentBottom="true"
          android:background="@android:color/black"&gt;
  
          &lt;Button
              android:id="@+id/saveNewBtn"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:onClick="saveData"
              android:text="Save" /&gt;
  
          &lt;Button
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:onClick="cancelAction"
              android:text="Cancel" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentTop="true"
          android:id="@+id/linearlayout"
          android:orientation="vertical"&gt;
      &lt;/LinearLayout&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Will update in a sec with a screen shot.</p>
  
  <p><a href="https://i.stack.imgur.com/LVcTI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LVcTI.jpg" alt="application screenshot"></a></p>