daimajia / AndroidSwipeLayout

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

Padding Issue #336

Open EpariNigam opened 8 years ago

EpariNigam commented 8 years ago

If I am giving padding to the SwipeLayout, then facing a strange issue, on the right side, getting some extra space. For reference attached an Image.

swipelayout padding issue

This is the code of layout,

<com.daimajia.swipe.SwipeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:swipe="http://schemas.android.com/apk/res-auto"
    android:id="@+id/swipe"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:padding="10dp"
    swipe:clickToClose="true">

    <LinearLayout
        android:id="@+id/leftView"
        android:layout_width="100dp"
        android:layout_height="80dp"
        android:background="#FF5534"
        android:gravity="center"
        android:tag="Bottom3"
        android:weightSum="10">

        <ImageView
            android:id="@+id/trash"
            android:layout_width="27dp"
            android:layout_height="30dp"
            android:layout_weight="1"
            android:src="@drawable/trash" />

        <TextView
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="5"
            android:text="Delete Item?"
            android:textColor="#fff"
            android:textSize="17sp" />

        <Button
            android:id="@+id/delete"
            android:layout_width="0dp"
            android:layout_height="40dp"
            android:layout_weight="4"
            android:background="#ffffff"
            android:text="Yes,Delete"
            android:textColor="#FF5534" />
    </LinearLayout>

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="#225588"
        android:elevation="5dp"
        android:padding="10dp">

        <TextView
            android:id="@+id/position"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content" />

        <TextView
            android:id="@+id/text_data"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:background="@android:color/white"
            android:tag="Hover" />
    </LinearLayout>
</com.daimajia.swipe.SwipeLayout>