在Android中自定义Google SignInButton [英] Customize Google SignInButton In Android
问题描述
我想在Android中自定义Google登录按钮.目前,通过使用以下代码,我拥有一个非常基本的默认布局.
I want to customise Google SignIn Button In Android. Currently I have a very basic default layout by using following code.
<com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
我对当前的按钮布局不满意.是否可以更新默认按钮中的按钮文本,背景色,还是我应该创建完整的自定义按钮布局?
I am not satisfied with the current button layout. Is it possible to update the button text, background colour in the default button, Or Should I create full custom button layout?
谢谢.
ps:我是Android的新手
ps: I am new to Android
推荐答案
非常简单,您需要执行此操作
Its very simple , you need to do this
<Button
android:id="@+id/button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:text="@string/common_signin_button_text_long" />
您可以自定义按钮,但必须确保遵循自定义登录按钮
You can customize your button , but you will have to make sure you follow the guidelines. Check out this library custom signin button
如果您想自己做,则可以创建线性布局并添加图像.
If you want to do it yourself you can create a linear layout and add images.
这篇关于在Android中自定义Google SignInButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!