daimajia / AndroidSwipeLayout

The Most Powerful Swipe Layout!
MIT License
12.38k stars 2.67k forks source link

Match parent issues. #355

Open ghost opened 8 years ago

ghost commented 8 years ago
<com.daimajia.swipe.SwipeLayout
        android:id="@+id/layout_swipe"
        android:layout_width="match_parent"
        android:layout_height="60dp"
        android:background="#000000">

        <LinearLayout
            android:id="@+id/layout_bottom"
            android:layout_width="60dp"
            android:layout_height="match_parent"
            android:background="#ffff00"
            android:orientation="horizontal">
        </LinearLayout>

        <LinearLayout
            android:id="@+id/layout_surface"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="#00ff00"
            android:gravity="center_vertical"
            android:orientation="horizontal">

            <CheckBox
                android:id="@+id/chb_task_name"
                android:layout_width="0dp"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="#0000ff"
                android:ellipsize="end"
                android:maxLines="1"
                android:paddingLeft="16dp"
                android:textColor="@android:color/black"
                android:textSize="16sp"/>

            <!--<FrameLayout-->
            <!--android:id="@+id/btn_open_task"-->
            <!--android:layout_width="wrap_content"-->
            <!--android:layout_height="match_parent"-->
            <!--android:layout_alignParentRight="true"-->
            <!--android:background="#ff0000">-->

            <!--<ImageView-->
            <!--android:id="@+id/img_arrow"-->
            <!--android:layout_width="wrap_content"-->
            <!--android:layout_height="wrap_content"-->
            <!--android:layout_gravity="center_vertical|right"-->
            <!--android:layout_marginLeft="4dp"-->
            <!--android:src="@drawable/ic_chevron_right"/>-->

            <!--</FrameLayout>-->

        </LinearLayout>

    </com.daimajia.swipe.SwipeLayout>

I expect that checkbox width will be match parent. But its not. There is a magical padding right. Look at screen below. How can I fix it?

photo_2016-08-03_15-04-38

daniestrella1 commented 6 years ago

must set fixed height