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" />
`
You can do it with XML by adding & using the
app
namespace (as they are custom attributes):Possible attributes values are:
"wide", "icon_only" or "standard"
(default)"dark", "light" & "auto"
(default)As the website described there are 3 sized button
You can use it like this.
You can use the setSize method of the Signin button to update the size.
For example, in my activity's
onCreate
method: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.