Reputation: 62209
Here's Erik Wallentinsen's PullToRefresh
ListView on github.
But it refreshes the listview from top only:
I want to change this, and refresh the listview when it gets pulled from bottom.
Apparently, it is needed to change this source.
Maybe somebody already had this issue and solved it?
Upvotes: 1
Views: 8091
Reputation: 10203
I recommend you use chrisbanes 's library: https://github.com/chrisbanes/Android-PullToRefresh which supports listview, gridview, scrollview, webview ... Here is an start guide
To refresh listview from bottom, just set mode for it. Here is an example that I tried:
PullToRefreshListView mPullRefreshListView =
(PullToRefreshListView) findViewById(R.id.listview);
mPullRefreshListView.setMode(Mode.BOTH); // mode refresh for top and bottom
mPullRefreshListView.setShowIndicator(false); //disable indicator
mPullRefreshListView.setPullLabel("Loading");
mPullRefreshListView.setOnRefreshListener(new OnRefreshListener<ListView>() {
public void onRefresh(PullToRefreshBase<ListView> refreshView) {
//do something when refresh
});
Upvotes: 10