I have a custom Button with a centered (default) text. I want to add an image just 8dp left of this text which are have to be in custom button.
I can add it only left with drawableLeft attribute. I want to make it more centered.
This is my custom button.
How to make centered that image? (8dp left of text)

Just use the
MaterialButtonwith theapp:iconGravityattribute.You can change the padding between the icon and the text using
app:iconPadding="xxdp"attribute.Example with
app:iconPadding="0dp":