tags:

views:

435

answers:

2

Hi

Im looking for an event that I can use on the scrollView to be fired when the user has scrolled to the bottom.

E.g my list of items should be extended with more items automatically.

Any ideas how this can be done?

I'm thanksfull for any tip.

+1  A: 

If you are using ListView rather than ScrollView, you can try my EndlessAdapter:

http://github.com/commonsguy/cwac-endless/tree

CommonsWare
+1  A: 

Given the requirements, you'll likely be extending BaseAdapter (as opposed to CursorAdapter which utilizes a different mechanism).

Here's a snippet for that:

public View getView(int position, View convertView, ViewGroup parent) {
    if (position == backingLinkedList.size()) {
        //get more items and add them to the backingLinkedList in a background thread
        notifyDataSetChanged();
    }
}
alex