Niranjan Niranjan - 2 months ago 10
Android Question

How to set the white color to google+ log in button?

I am using google+ login for my app. I want to change the color of button from red to white.Here is my xml code.

<com.google.android.gms.common.SignInButton
android:id="@+id/btn_sign_in"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/logo"
android:layout_centerHorizontal="true"
android:layout_marginTop="30dp"

>

Answer

Try this way

signInButton = (SignInButton) findViewById(R.id.signInButton);
        signInButton.setSize(SignInButton.SIZE_STANDARD);
        signInButton.setColorScheme(SignInButton.COLOR_LIGHT);