I'm using the latest version of the com.google.android.material:material library (i.e. 1.1.0-alpha03) and I have a MaterialButton defined with an icon and no text as follows:
I was hoping the MaterialButton would be rendered as a square with the icon centred within it but instead the MaterialButton is rendered as follows:
If I change the iconGravity value to "textStart" the MaterialButton is rendered as follows:
This is a slight improvement to the positioning of the icon but the icon is still a little off centre. If I change the insetLeft, insetRight, insetTop and insetBottom values to 0dp the MaterialButton is rendered as follows:
This is an improvement to the shape of the button but the icon is still a little off centre.
Anyone know whether there's something further I can do to centre the icon within the MaterialButton?




