简体   繁体   中英

Android - scrolling down listView at the bottom

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?

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

    }
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM