title: Android: What is the use of padding in shape drawables?
body: <p>I try to understand the default background of Button (android 26).</p>
  
  <p><code>sdk/platforms/android-26/data/res/drawable/btn_default_material.xml</code> </p>
  
  <pre><code>&lt;ripple xmlns:android="http://schemas.android.com/apk/res/android"
          android:color="?attr/colorControlHighlight"&gt;
      &lt;item android:drawable="@drawable/btn_default_mtrl_shape" /&gt;
  &lt;/ripple&gt;
  </code></pre>
  
  <p>references:</p>
  
  <p><code>sdk/platforms/android-26/data/res/drawable/btn_default_mtrl_shape.xml</code>:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;inset xmlns:android="http://schemas.android.com/apk/res/android"
         android:insetLeft="@dimen/button_inset_horizontal_material"
         android:insetTop="@dimen/button_inset_vertical_material"
         android:insetRight="@dimen/button_inset_horizontal_material"
         android:insetBottom="@dimen/button_inset_vertical_material"&gt;
      &lt;ripple android:color="?attr/colorControlHighlight"&gt;
          &lt;item&gt;
              &lt;shape android:shape="rectangle"
                     android:tint="@color/btn_colored_background_material"&gt;
                  &lt;corners android:radius="@dimen/control_corner_material" /&gt;
                  &lt;solid android:color="@color/white" /&gt;
                  &lt;padding android:left="@dimen/button_padding_horizontal_material"
                           android:top="@dimen/button_padding_vertical_material"
                           android:right="@dimen/button_padding_horizontal_material"
                           android:bottom="@dimen/button_padding_vertical_material" /&gt;
              &lt;/shape&gt;
          &lt;/item&gt;
      &lt;/ripple&gt;
  
  &lt;/inset&gt;
  </code></pre>
  
  <p>I understand the inset. That is the space around the button background image. I don't understand the padding. There is no text in the background image.</p>
  
  <p>To give an approach to think about it: What would happen if you remove the <code>padding</code> tag? </p>
  
  <p>You may come to the conclusion that nothing would happen (I am not sure, that nothing would happen). But if nothing happens, you have the question what is it useful for? Why did they place it there?</p>