Skip to content Skip to sidebar Skip to footer

Need Help To Implement 47degree Android-swipelistview

Need help to implement 47degree Android-SwipeListView Library URL: https://github.com/47deg/android-swipelistview Full Fledge Working Example: https://play.google.com/store/apps/d

Solution 1:

Finally I managed to integrate 47degree Android-SwipeListView in my own application.

Works like a charm. Thanks 47degree to write such a wonderful piece of code.

Answer :

What is not working!!?

Including JAR as dependency and attrs.xml in res/values OR referencing to the swipelistview library as lib dependency project in your project is not working.

What works!!?

Include following classes into your application package. Also correct package names in these classes to your package name.

  • SwipeListView.java
  • SwipeListViewListener.java
  • SwipeListViewListenerBase.java
  • SwipeListViewTouchListener.java

Include following xml into your application res/values folder.

  • attrs.xml

Now you can define and use SwipeListView as follows.

<au.com.your.package.SwipeListView
        xmlns:swipe="http://schemas.android.com/apk/res-auto"
        android:id="@+id/swipe_listview"
        android:listSelector="#00000000"
        android:layout_width="match_parent"
        android:layout_height="match_parent"        
        swipe:swipeFrontView="@+id/front"
        swipe:swipeBackView="@+id/back"
        swipe:swipeActionLeft="reveal"
        swipe:swipeActionRight="choice"
        swipe:swipeMode="both"
        swipe:swipeCloseAllItemsWhenMoveList="true"
        swipe:swipeOpenOnLongPress="true"
        swipe:swipeAnimationTime="100"
        swipe:swipeOffsetLeft="50dp"
        swipe:swipeDrawableChecked="@drawable/item_selected"
        swipe:swipeDrawableUnchecked="@drawable/item_unselected"
   />

Activity code you can use same as displayed in the example on SwipeListView github site.

https://github.com/47deg/android-swipelistview-sample/blob/master/src/main/java/com/fortysevendeg/android/swipelistview/sample/activities/SwipeListViewExampleActivity.java

You will need to correct some imports from the code above.

Post a Comment for "Need Help To Implement 47degree Android-swipelistview"