title: Emulating standard dialog size using dialog_min_width_minor
body: <p>For some reason I can't use a Dialog, so I'm just emulating it with a View hierarchy. I want to make my dialog appear in the center of the screen with a standard Android dialog size.</p>
  
  <p>I found a resource value <a href="http://developer.android.com/reference/android/R.dimen.html#dialog_min_width_minor" rel="nofollow">dialog_min_width_minor</a>, but how do I use it? When I try to do it like this: </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  
  &lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:background="@color/semi_transparent"
      android:layout_width="match_parent"
      android:layout_height="match_parent"&gt; &lt;!-- provides the gray semi-transparent background !--&gt;
  
      &lt;FrameLayout
          android:id="@+id/dialog_container"
          android:layout_gravity="center"
          android:background="@android:color/white"
          android:layout_height="wrap_content"
          android:layout_width="@android:dimen/dialog_min_width_minor"/&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <p>I just get an exception: </p>
  
  <blockquote>
    <p>Binary XML file line #8: You must supply a layout_width attribute.</p>
  </blockquote>