[英]Can I unify the style of facebook sign in button like Google in android app?
我正在使用登錄系統制作該應用程序。 但是我想統一每個按鈕的樣式。 我的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
簡單樣式的按鈕即可完成工作。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.