Reputation: 1813
I'm using a custom ListView in android to display somedata ... By default i made the size of the ListView to be 25. I want when the user scoll down at the buttom of the listView to display another 25 views in addition to the previous one ( The list now should display 50 elements)
How can be this implemented?
Upvotes: 0
Views: 710
Reputation: 4356
try to use this
ListView lv = (ListView)findViewById(R.id.list_view);
lv.setOnScrollListener(new OnScrollListener() {
@Override
public void onScroll(AbsListView view, int firstVisibleItem,
int visibleItemCount, int totalItemCount) {
//load more content
}
});
Upvotes: 1