shobhitpuri / custom-google-signin-button

A custom SignInButton for Android that supports 'android:text' attribute, currently not supported by Google's original 'SignInButton'. This library also allows to set button theme to dark or light and is based on Google guidelines.
http://go.shobhitpuri.com/googlesignin
MIT License
78 stars 25 forks source link

Text orientation(position) #3

Open blaze6950 opened 6 years ago

blaze6950 commented 6 years ago

I ran into the problem that if the width of the button is large, the text is not centered on the button, but centered if you count from the end of the logo to the end of the button. Is there any way to fix this? I hope, you understood me P.S. I want the text to be centered, like the facebook button default

shobhitpuri commented 6 years ago

@blaze6950 Thanks for requesting this feature.

Observation: This seems to be the fundamental difference b/w the default Facebook and Google buttons.

Potential Solution: Adhering to the padding guidelines mentioned on the official Google SignIn button branding guidelines, we can try to decrease the padding on left equal to the width of the Google logo. This would make it appear centred but we'll have to make sure the min padding b/w the logo and the text. google_button_spec

I will create a feature request and will try to take out time to work on it. Feel free to open a pull request with a fix. :)