我正在使用登录系统制作该应用程序。但是我想统一每个按钮的样式。我的activity_login.xml显示了我正在使用的小部件。我想将Google按钮样式应用于“继续使用Facebook”。
<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" />
最简单的解决方案是将这些按钮添加到布局中,制作它们visibility
-GONE
并使用您想要的样式添加自定义按钮。
在单击时,只需传递如下所示的click事件:
loginFacebookStyledButton.setOnClickListener {
loginFacebookActualInvisibleButton.performClick()
}
使用Google登录后,我认为您不需要SignInButton
简单样式的按钮即可完成工作。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句