This page refers to a deprecated version of Google Sign-In. New projects should use the current version.

Customizing the Sign-In Button

You can design a custom sign-in button to fit with your app's designs. The SignInButton class offers you the ability to change the color theme and the dimensions of the button. If you require additional customization, you can define a custom button.

Before you begin

Customize your sign-in button

To define a custom button:

  1. Review the branding guidelines and download icons and images to use in your button.

  2. Add the button to your application layout.

    <Button
       android:id="@+id/button"
       android:layout_width="wrap_content"
       android:layout_height="wrap_content"
       android:layout_centerHorizontal="true"
       android:text="@string/common_signin_button_text_long" />
    

This example loads localized text from the SDK. You could also use getString(com.google.android.gms.R.string.common_signin_button_text_long) within your activity's onCreate method to get the label for the button text. However you implement your sign-in button, you must follow the branding guidelines.