title: Alert dialog box Shifting left and right
body: <p>Well I have achieved the rounded corner goal in alert dialog box but it has taken all the left and right side.
  My question is like I want some space between left and right  of the dialog box
  Here is my code:Custom dialog</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="wrap_content"
                  android:orientation="vertical"
                  android:background="@drawable/custom_dialog"
      &gt;
      &lt;TextView
            android:layout_height="wrap_content"
            android:layout_width="wrap_content"
            android:text="SELECT PHOTO"
            android:textSize="15dp"
            android:paddingBottom="12dp"
            android:paddingTop="12dp"
            android:layout_marginLeft="20dp"&gt;&lt;/TextView&gt;
      &lt;View
             android:layout_width="match_parent"
             android:layout_height="1dp"
             android:background="@color/hint_color"&gt;&lt;/View&gt;
      &lt;LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:orientation="horizontal"
             android:paddingTop="15dp"
             android:id="@+id/Select_photo_from_Camera"&gt;
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/camera_24dp"
              android:layout_marginLeft="22dp"
              /&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Camera"
              android:layout_marginLeft="10dp"
              &gt;&lt;/TextView&gt;
      &lt;/LinearLayout&gt;
      &lt;LinearLayout
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:orientation="vertical"&gt;
          &lt;View
              android:layout_width="600dp"
              android:layout_height="1dp"
              android:layout_marginTop="10dp"
              android:background="@color/hint_color"&gt;&lt;/View&gt;
      &lt;/LinearLayout&gt;
      &lt;LinearLayout
               android:layout_width="match_parent"
               android:layout_height="wrap_content"
               android:orientation="horizontal"
               android:paddingTop="15dp"
               android:paddingBottom="5dp"
          &gt;
          &lt;ImageView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/ic_photo_library_black_24dp"
              android:layout_marginLeft="22dp"/&gt;
          &lt;TextView
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:text="Gallery"
              android:layout_marginLeft="10dp"
  
              /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;/LinearLayout&gt; 
  </code></pre>
  
  <p>Code for :Custom_dialog.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;solid
          android:color="@color/white"&gt;&lt;/solid&gt;
      &lt;corners
          android:radius="5dp"
          &gt;&lt;/corners&gt;
      &lt;padding
          android:top="6dp"
          android:bottom="6dp"&gt;&lt;/padding&gt;
  
  &lt;/shape&gt;
  </code></pre>
  
  <p>Here is the Output of my achievement:</p>
  
  <p><a href="https://i.stack.imgur.com/7G0Go.png" rel="nofollow noreferrer">https://i.stack.imgur.com/7G0Go.png</a></p>