这里是XML的基本Google+ Android登录按钮:
<com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
在类documentation中,您可以将按钮的大小指定为ICON_ONLY,STANDARD和WIDE。
您如何使用xml进行此操作?
这里是如何在XML中进行操作。
这里是有关大小和样式的SignInButton方法列表:
setSize()是一个公共方法,请尝试在运行时通过java as使用它。
mSignInButton.setSize(1); // SIZE_WIDE
mSignInButton.setSize(2); // SIZE_ICON_ONLY
mSignInButton.setSize(0); // SIZE_STANDARD