Skip to content
Advertisement

Android studio – How to set text position on center when using drawableLeft property on a Button?

How to set text set on center position when using DrawableLeft on a button?

JavaScript

enter image description here

the text START WITH GOOGLE is not placed on the center. How to center it?

Advertisement

Answer

One hacky solution is to make a transparent png file or the same color as the background with the exact dimensions of icon_google and set it as drawableRight like so:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement