我可以像android应用程序中的谷歌那样统一facebook登录按钮的风格吗?
我正在使用登录系统制作应用程序。但我想统一每个按钮的样式。我的activity_login.xml显示了我正在使用的小部件。我想将Google按钮样式应用于“继续使用Facebook”我可以像android应用程序中的谷歌那样统一facebook登录按钮的风格吗?,android,facebook,firebase,authentication,Android,Facebook,Firebase,Authentication,我正在使用登录系统制作应用程序。但我想统一每个按钮的样式。我的activity_login.xml显示了我正在使用的小部件。我想将Google按钮样式应用于“继续使用Facebook” <com.google.android.gms.common.SignInButton android:id="@+id/login_sign_google" android:layout_width="match_parent" android:layout
<com.google.android.gms.common.SignInButton
android:id="@+id/login_sign_google"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
<com.facebook.login.widget.LoginButton
android:layout_width="match_parent"
android:layout_height="wrap_content" />
最简单的解决方案就是将这些按钮添加到布局中,使它们的
可见性
-消失
并添加自定义按钮,使其具有您想要的样式
单击“仅传递”单击事件,如下所示:
loginFacebookStyledButton.setOnClickListener {
loginFacebookActualInvisibleButton.performClick()
}
有了谷歌登录,我认为你不需要使用SignInButton
simple-styled按钮来完成这项工作