我正在尝试将Firebase Authentication添加到我的应用中。由于我想要一致的布局,因此尝试在LinearLayout上调整Google登录按钮和Facebook登录按钮,如下所示:
或更糟糕的是,像这样(LG G7 ThinQ API 28:]]
我目前在我的XML布局中使用Googles和Facebooks开发人员页面中的正式代码
:<LinearLayout android:layout_width="0dp" android:layout_height="match_parent" android:layout_weight="7" android:orientation="vertical"> <com.google.android.gms.common.SignInButton android:id="@+id/google_login_button" android:layout_width="match_parent" android:layout_height="wrap_content" /> <com.facebook.login.widget.LoginButton android:id="@+id/facebook_login_button" android:layout_width="match_parent" android:layout_height="wrap_content" /> </LinearLayout>
因此,我发现为了调整两个按钮,存在[[需要修复的两个主要方面
2)在这里,我还尝试调整了Facebook按钮,但它似乎不起作用。根据官方Sign-In Branding Guidelines from Google,徽标和文本之间的填充为24dp,但是当我在Facebook Button的徽标和文本之间添加24dp的填充时,它仍然看起来像这样:
也许有人经历过同样的斗争?有没有图书馆可以轻松做到这一点?感谢您的帮助。
我正在尝试将Firebase身份验证添加到我的应用程序。因为我想要一个一致的布局,所以我尝试在LinearLayout上调整Google登录按钮和Facebook登录按钮,如下所示:但是...
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<com.google.android.gms.common.SignInButton
android:id="@+id/google_login_button"
android:layout_width="200dp"
android:layout_height="80dp" />
<com.facebook.login.widget.LoginButton
android:id="@+id/facebook_login_button"
android:layout_width="200dp"
android:layout_height="80dp" />
</LinearLayout>