Android アプリに Facebook、Twitter、Google プラスの 3 つのソーシャル ネットワーク ログイン ボタンを追加したいと考えています。高さを調整するためにパディングを追加できますが、これは正しい方法ではないと思います。以前にこの問題に直面し、以前に解決したことがある場合は、私と共有してください。
これまでに行ったコードは次のとおりです。高さの問題は修正されているように見えますが、ログイン テキストは適切ではないようです。
<RelativeLayout
android:id="@+id/line_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<View
android:layout_width="match_parent"
android:layout_height="@dimen/elevation"
android:layout_centerVertical="true"
android:background="@color/grey" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:background="@color/black"
android:text="OR"
android:textColor="@color/white" />
</RelativeLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/line_layout"
android:layout_centerHorizontal="true"
android:orientation="vertical">
<TextView
android:id="@+id/info_text_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="info here" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize">
<com.facebook.login.widget.LoginButton
android:id="@+id/login_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:paddingBottom="20dp"
android:paddingTop="20dp" />
</LinearLayout>
<LinearLayout
android:layout_marginTop="@dimen/screen_padding_lr"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize">
<com.twitter.sdk.android.core.identity.TwitterLoginButton
android:id="@+id/twitter_login_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal"
android:paddingBottom="10dp"
android:paddingTop="10dp" />
</LinearLayout>
<LinearLayout
android:layout_marginTop="@dimen/screen_padding_lr"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize">
<com.google.android.gms.common.SignInButton
android:id="@+id/sign_in_button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="center_horizontal" />
</LinearLayout>
</LinearLayout>