title: How to customize the ImageButton style?
body: <p>I am making a numeric keyboard.
  <a href="https://i.stack.imgur.com/m8los.png" rel="nofollow noreferrer">keyboard appearance</a></p>
  <p>I have a problem with the decoration of the return button.
  If I use ImageButton, then I get an indent from the top, as in the picture:</p>
  <p><a href="https://i.stack.imgur.com/KQEPj.png" rel="nofollow noreferrer">button backspace</a></p>
  <pre><code>    &lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
  &lt;androidx.constraintlayout.widget.ConstraintLayout xmlns:android=&quot;http://schemas.android.com/apk/res/android&quot;
      xmlns:app=&quot;http://schemas.android.com/apk/res-auto&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;match_parent&quot;&gt;
  
  &lt;!-- other buttons --&gt;
      &lt;com.google.android.material.button.MaterialButton
          android:id=&quot;@+id/btnPoint&quot;
          style=&quot;@style/KeypadButton&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;0dp&quot;
          android:layout_margin=&quot;0dp&quot;
          android:padding=&quot;0dp&quot;
          android:text=&quot;.&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toStartOf=&quot;@+id/btnNumber0&quot;
          app:layout_constraintHorizontal_bias=&quot;0.5&quot;
          app:layout_constraintStart_toStartOf=&quot;parent&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/btnNumber1&quot; /&gt;
  
      &lt;com.google.android.material.button.MaterialButton
          android:id=&quot;@+id/btnNumber0&quot;
          style=&quot;@style/KeypadButton&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;0dp&quot;
          android:layout_margin=&quot;0dp&quot;
          android:padding=&quot;0dp&quot;
          android:text=&quot;0&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toStartOf=&quot;@+id/btnBackspace&quot;
          app:layout_constraintHorizontal_bias=&quot;0.5&quot;
          app:layout_constraintStart_toEndOf=&quot;@+id/btnPoint&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/btnNumber2&quot; /&gt;
  
      &lt;com.google.android.material.button.MaterialButton
          android:id=&quot;@+id/btnBackspace&quot;
          style=&quot;@style/KeypadButton&quot;
          android:layout_width=&quot;0dp&quot;
          android:layout_height=&quot;0dp&quot;
          android:layout_margin=&quot;0dp&quot;
          android:padding=&quot;0dp&quot;
          android:scaleType=&quot;center&quot;
          android:text=&quot;&quot;
          app:iconGravity=&quot;end&quot;
          app:layout_constraintBottom_toBottomOf=&quot;parent&quot;
          app:layout_constraintEnd_toEndOf=&quot;parent&quot;
          app:layout_constraintHorizontal_bias=&quot;0.5&quot;
          app:layout_constraintStart_toEndOf=&quot;@+id/btnNumber0&quot;
          app:layout_constraintTop_toBottomOf=&quot;@+id/btnNumber3&quot; /&gt;
  
  &lt;/androidx.constraintlayout.widget.ConstraintLayout&gt;
  </code></pre>
  <p>This is the style of the buttons</p>
  <pre><code>&lt;!--  Keyboard  --&gt;
      &lt;style name=&quot;KeypadButton&quot; parent=&quot;Widget.MaterialComponents.TextView&quot;&gt;
          &lt;item name=&quot;android:textSize&quot;&gt;@dimen/font_large_30&lt;/item&gt;
          &lt;item name=&quot;android:textStyle&quot;&gt;bold&lt;/item&gt;
          &lt;item name=&quot;android:textColor&quot;&gt;@color/swatch_7&lt;/item&gt;
          &lt;item name=&quot;backgroundTint&quot;&gt;@color/key_number&lt;/item&gt;
          &lt;item name=&quot;android:background&quot;&gt;@drawable/ripple_bg&lt;/item&gt;
          &lt;item name=&quot;android:textAlignment&quot;&gt;center&lt;/item&gt;
          &lt;item name=&quot;android:gravity&quot;&gt;center&lt;/item&gt;
          &lt;item name=&quot;elevation&quot;&gt;0dp&lt;/item&gt;
      &lt;/style&gt;
  </code></pre>
  <p>If I inherit the ImageButton style, then I get padding around the button, which cannot be removed.</p>
  <p>Please tell me how to properly design the backspace button.</p>
  <p><a href="https://github.com/mertsalovda/Calculator-of-power/tree/develop" rel="nofollow noreferrer">Link to the project</a></p>