janishar / PlaceHolderView

This library provides advance views for lists and stacks. Some of the views are build on top of RecyclerView and others are written in their own. Annotations are compiled by annotation processor to generate bind classes. DOCS -->
http://janishar.com/PlaceHolderView
Apache License 2.0
2.11k stars 369 forks source link

implement @LoadMore in SwipePlaceHolderView #22

Closed NDroid86 closed 7 years ago

NDroid86 commented 7 years ago

How can I implement @LoadMore in SwipePlaceHolderView??

janishar commented 7 years ago

@NishantRajput You want to implement loading for the swipe views till you get more data from the api?

NDroid86 commented 7 years ago

Yes, I want a bunch of user to display in which page returns 20 users at time and I want to load more pages.

janishar commented 7 years ago

@NishantRajput Please use version 0.6.1

compile 'com.mindorks:placeholderview:0.6.1'

See the release note: https://github.com/janishar/PlaceHolderView/releases/tag/0.6.1

mSwipePlaceHolderView.addItemRemoveListener(new ItemRemovedListener() {

        @Override
        public void onItemRemoved(int count) {
            //do something when the count changes to some specific value.
            //For Example: Call server to fetch more data when count is zero
        }
    });
NDroid86 commented 7 years ago

Thanks.. Its working.