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, sh
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
Just make this button visibility View.GONE, make your custom button and send onclick event from your button to SignInButton.performClick()
You can use the setSize method of the Signin button to update the size.
For example, in my activity's onCreate method:
mSignInButton = (SignInButton) findViewById(R.id.sign_in_button);
mSignInButton.setOnClickListener(this);
mSignInButton.setSize(SignInButton.SIZE_WIDE);
will change the Sign-In button to be wide.
You can also just use ANY button that is appropriately branded by just using a Button and then using the activity as the button's click handler.
You can do it with XML by adding & using the app namespace (as they are custom attributes):
<com.google.android.gms.common.SignInButton
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:buttonSize="wide"
app:colorScheme="dark"
/>
Possible attributes values are:
"wide", "icon_only" or "standard"(default)"dark", "light" & "auto"(default)