Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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" 

    >
like image 709
Niranjan Avatar asked Dec 14 '22 20:12

Niranjan


2 Answers

Try this way

signInButton = (SignInButton) findViewById(R.id.signInButton);
        signInButton.setSize(SignInButton.SIZE_STANDARD);
        signInButton.setColorScheme(SignInButton.COLOR_LIGHT);
like image 136
Biraj Zalavadia Avatar answered Jan 06 '23 00:01

Biraj Zalavadia


<!-- white button -->
<com.google.android.gms.common.SignInButton
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:colorScheme="light" />

<!-- blue button -->
<com.google.android.gms.common.SignInButton
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:colorScheme="dark" />
like image 44
JP Ventura Avatar answered Jan 06 '23 00:01

JP Ventura