title: How to remove dialog margins?
body: <p>I'm trying to create a custom dialog to show a list of values at the bottom of screen.</p>
  
  <p>How can I remove the dialog margins?</p>
  
  <p>I want this...
  <img src="https://i.stack.imgur.com/4iP9s.png" alt="enter image description here"></p>
  
  <p>I have this...
  <img src="https://i.stack.imgur.com/3ZeJM.png" alt="enter image description here"></p>
  
  <p>Dialog code:</p>
  
  <pre><code>Dialog d = new Dialog(this);
      d.requestWindowFeature(Window.FEATURE_NO_TITLE);
      d.setContentView(R.layout.dialog_options);
      Window window = d.getWindow();
      WindowManager.LayoutParams wlp = window.getAttributes();
      wlp.width = WindowManager.LayoutParams.MATCH_PARENT;
      wlp.gravity = Gravity.BOTTOM;
      window.setAttributes(wlp);
      d.show();
  </code></pre>
  
  <p>Solved! Better solution:</p>
  
  <pre><code>&lt;style name="BottomOptionsDialogTheme" parent="Theme.AppCompat.Light.Dialog"&gt;
      &lt;item name="android:windowBackground"&gt;@null&lt;/item&gt;
      &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt;
      &lt;item name="android:windowIsFloating"&gt;false&lt;/item&gt;
      &lt;item name="android:layout_margin"&gt;0dp&lt;/item&gt;
      &lt;item name="android:padding"&gt;0dp&lt;/item&gt;
      &lt;item name="android:layout_gravity"&gt;bottom&lt;/item&gt;
  
      &lt;item name="colorPrimary"&gt;@color/orange_dark&lt;/item&gt;
      &lt;item name="colorPrimaryDark"&gt;@color/orange_dark&lt;/item&gt;
      &lt;item name="colorAccent"&gt;@color/gray_light&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>And use new Dialog(context, R.theme.BottomOptionsDialogTheme);</p>