表布局“切断”复选框

时间:2018-12-28 09:54:17

标签: android android-layout android-tablelayout

我对复选框有疑问。看起来我的TableLayout正在“切断”顶部和底部。也许这是一个简单的问题,但我不知道如何预防。我也想在列之间进行填充,但是我认为这应该不是问题。

这是我的xml代码:

    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        xmlns:app="http://schemas.android.com/apk/res-auto"
        android:background="#0099cc"
        tools:context="com.example.skypedogg.srvapp.PinPadActivity">

        <View
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@drawable/gradient_background">
        </View>

            <LinearLayout
                android:id="@+id/fullscreen_content_controls"
                style="?metaButtonBarStyle"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom|center_horizontal"
                android:background="@color/black_overlay"
                android:orientation="horizontal"
                android:fitsSystemWindows="true"
                tools:ignore="UselessParent">

                <Button
                    android:id="@+id/dummy_button"
                    style="?metaButtonBarButtonStyle"
                    android:layout_width="0dp"
                    android:layout_height="wrap_content"
                    android:layout_weight="1"
                    android:textColor="@color/mdtp_white"
                    android:text="OK" />
            </LinearLayout>

        <TableLayout android:layout_height="wrap_content"
            android:layout_width="match_parent"
            android:gravity="center_vertical"
            android:padding="50dp">

            <TableRow>
                <net.igenius.customcheckbox.CustomCheckBox
                    android:id="@+id/check1"
                    app:color_checked="@color/usafaBlue"
                    android:layout_weight="1" />
                <net.igenius.customcheckbox.CustomCheckBox
                    android:id="@+id/check2"
                    app:color_checked="@color/usafaBlue"
                    android:layout_weight="1"/>
                <net.igenius.customcheckbox.CustomCheckBox
                    android:id="@+id/check3"
                    app:color_checked="@color/usafaBlue"
                    android:layout_weight="1"/>
                <net.igenius.customcheckbox.CustomCheckBox
                    android:id="@+id/check4"
                    app:color_checked="@color/usafaBlue"
                    android:layout_weight="1"/>
            </TableRow>
        </TableLayout>
    </FrameLayout>

0 个答案:

没有答案