Reputation: 1837
I am trying to use both PullToRefresh and SwipeListView libraries in listview using PullToRefreshSwipeListView custom view class. I have implemented it like that:
First I have imported PullToRefresh library into my project then I have added a SwipeListView Jar File into PullToRefresh library projet by making a libs folder in it. Then I have added PullToRefreshSwipeListView class in the src folder(com.handmark.pulltorefresh.library) of PullToRefresh library project. Finally I am trying to implement this custom class PullToRefreshSwipeListView into my project's xml as:
<com.handmark.pulltorefresh.library.PullToRefreshListView
xmlns:swipe="http://schemas.android.com/apk/res-auto"
xmlns:ptr="http://schemas.android.com/apk/res-auto"
android:id="@+id/lv_Inbox"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:cacheColorHint="#00000000"
android:divider="#19000000"
android:dividerHeight="2dp"
android:fadingEdge="none"
android:fastScrollEnabled="false"
android:footerDividersEnabled="false"
android:headerDividersEnabled="false"
android:scrollbars="none"
android:smoothScrollbar="true"
ptr:ptrAnimationStyle="flip" >
<libs.swipelistview.SwipeListView
android:id="@+id/users_list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:cacheColorHint="#0000"
android:clipToPadding="false"
android:divider="@null"
android:dividerHeight="0px"
android:fadingEdge="none"
android:scrollbarStyle="outsideOverlay"
swipe:swipeActionLeft="reveal" />
</com.handmark.pulltorefresh.library.PullToRefreshListView>
But I am getting error in xml as:
It does not get any of the swipe attribute but If I remove swipe attributes. It is working fine for only PullToRefresh. I am following this link to implement it. Any Solution/Comments will be most appreciated.
Upvotes: 1
Views: 1149
Reputation: 3195
Why are you trying to merge PullToRefresh into SwipeListView library ? I have used PullToRefresh with SwipeListView without no problems (just imported using gradle not JARs).
You are getting these errors because you have not copied swipelistview__attrs.xml from res/values in SwipeListView library (this file)
Upvotes: 1
Reputation: 2499
better you go with
swiperefresh layout
https://developer.android.com/reference/android/support/v4/widget/SwipeRefreshLayout.html
Upvotes: 1