I see very much libraries for ListView pull to refresh. But they are work, when pull from top to down, but how i can do refresh when pull from bottom to up? Can i make this with SwipeRefreshLayout ? If no, what library i must use? And how do that?
use chrisbanes 's library: https://github.com/chrisbanes/Android-PullToRefresh which supports listview, gridview, scrollview, webview ...
To refresh listview from bottom, just set mode for it. Here is an example :
PullToRefreshListView ptr=
(PullToRefreshListView) findViewById(R.id.listview);
mPullRefreshListView.setMode(Mode.BOTH); // mode refresh for top and bottom
mPullRefreshListView.setShowIndicator(false); //disable indicator
mPullRefreshListView.setPullLabel("Loading");
ptr.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
//do something when refresh
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With