I need the long style button for google+ signin in android.
According to the Branding guidelines here there are different styles for the button like long, medium, short etc
I am getting the medium style button with help of the sample app, But I want the long style button.
here is my button `
<com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:visibility="visible" />
`
To create a Google Sign-In button with custom settings, add an element to contain the sign-in button to your sign-in page, write a function that calls signin2. render() with your style and scope settings, and include the https://apis.google.com/js/platform.js script with the query string onload=YOUR_RENDER_FUNCTION .
As the website described there are 3 sized button
You can use it like this.
gSignInButton = (SignInButton) findViewById(R.id.sign_in_button);
gSignInButton.setOnClickListener(this);
gSignInButton.setEnabled(true);
gSignInButton.setSize(SignInButton.SIZE_WIDE);// wide button style
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With