title: Custom dialog with Image outside boundaries of the view?
body: <p>I'm trying to create a <code>Custom Dialog</code> like <a href="https://i.imgur.com/xcz8oQL.jpg" rel="nofollow noreferrer">this</a>, I'm following this <a href="https://stackoverflow.com/questions/20258730/custom-dialog-with-close-button/29026658#29026658">answer</a> but changing the <code>layout_gravity</code> to this <code>android:layout_gravity="center_horizontal|top"</code> and it puts on the center of the <code>Dialog</code> as I want, but the thing is that if I want to put the <code>ImageView</code> bigger it destroys the <code>xml</code>, also the <code>Dialog</code> itself it's too small because I only have a <code>TextView</code> and an <code>EditText</code> so what I'm doing wrong?</p>
  
  <p>This is my xml.</p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent" &gt;
  
  &lt;FrameLayout
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_gravity="center" &gt;
  
      &lt;FrameLayout
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:padding="15dp" &gt;
  
          &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_gravity="center"
              android:background="#fff"
              android:orientation="vertical"
              android:padding="10dp" &gt;
  
              &lt;TextView
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:text="Choose the receiver"
                  android:textColor="@color/blue"
                  android:textSize="16dp" /&gt;
  
              &lt;EditText
                  android:layout_width="fill_parent"
                  android:layout_height="wrap_content"
                  android:layout_marginTop="15dp"
                  android:background="@drawable/edittext_style"
                  android:hint="Username"
                  android:padding="5dp"
                  android:singleLine="true"
                  android:textColorHint="@color/wallet_holo_blue_light" /&gt;
  
          &lt;/LinearLayout&gt;
      &lt;/FrameLayout&gt;
  
      &lt;ImageView
          android:layout_width="30dp"
          android:layout_height="30dp"
          android:layout_gravity="center_horizontal|top"
          android:src="@drawable/icon_mail" /&gt;
  &lt;/FrameLayout&gt;
  &lt;/FrameLayout&gt;
  </code></pre>
  
  <h2>OUTPUT</h2>
  
  <p><a href="https://i.stack.imgur.com/VEbW3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VEbW3.jpg" alt="enter image description here"></a></p>
  
  <p>Also I've a <code>Drawable</code> to put it on the <code>Dialog</code> to create a border roundered with color and if I put it on <code>LinearLayout</code> it doesn't show up.</p>
  
  <p>This is the rounded_border.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  &lt;item&gt;
      &lt;shape android:shape="rectangle" &gt;
          &lt;solid android:color="@color/white" /&gt;
          &lt;corners android:radius="12dip" /&gt;
          &lt;stroke
              android:width="1dip"
              android:color="@color/wallet_holo_blue_light" /&gt;
      &lt;/shape&gt;
  &lt;/item&gt;
  </code></pre>
  
  <p></p>
  
  <p>If I change the size of the <code>ImageView</code> happens this : </p>
  
  <p><a href="https://i.stack.imgur.com/0jiTS.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0jiTS.jpg" alt="enter image description here"></a></p>