When I remove the last swipelayout from the listview and then notifydatachanged, then add another new swipelayout in the listview, i get the swipe layout status is close, but it shows open, why?
However, when i delete the the last swipelayout after it complete the animation of the close, it seems run correctly! But when it delete the layout, i don't want to have this close animatiom, what should I do?
When I remove the last swipelayout from the listview and then notifydatachanged, then add another new swipelayout in the listview, i get the swipe layout status is close, but it shows open, why?
here is listview item xml: <?xml version="1.0" encoding="utf-8"?> <com.daimajia.swipe.SwipeLayout xmlns:swipe="http://schemas.android.com/apk/res-auto" xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/swipe" android:layout_width="match_parent" swipe:leftEdgeSwipeOffset="0dp" swipe:rightEdgeSwipeOffset="0dp" android:layout_height="wrap_content"> <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:padding="10dp" android:background="#FF5534" android:gravity="center_vertical" 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" /> <LinearLayout android:orientation="horizontal" android:layout_width="match_parent" android:padding="5dp" android:layout_height="50dp">
</com.daimajia.swipe.SwipeLayout>
here is my adapter: class RecipeAdapter extends BaseSwipeAdapter {