0

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?

Developer
  • 1,803
  • 2
  • 15
  • 26
  • check this answer to see if it helps http://stackoverflow.com/questions/1080811/android-endless-list – dymmeh Apr 26 '12 at 13:40
  • what you trying to do you want "LoadMore" button and of the list after 25 list and user click on the loadmore button and then load net 25 elements in the list right... – user755278 Apr 26 '12 at 13:40
  • simple add one button by addFooter(...) and load data in onClick – MAC Apr 26 '12 at 13:41

1 Answers1

1

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

    }
});
Zaz Gmy
  • 4,236
  • 3
  • 19
  • 30