About

This is another endless list implementation for Android. The endless list is a term in the Android space which means a ListView which has no fixed length. The entries are retrieved and added dynamically as a batch of entries (page). The user can page through the entries and depending on the implementation it automatically loads the next page at the end of the list or a more button is presented.

The focus of this implementation is modularity and flexibility. Which means that you can achieve a simple endless list with a couple of lines. But you can also create a very sophisticated setup.

Architecture

One goal of this project was to have a modular design and replacable components.

The main component is the GenericArrayAdapter class which is a subclass of the standard Android ArrayAdapter. Every other component is hooked into the GenericArrayAdapter.

The GenericArrayAdapter does not know where the data comes from. The user of this library must implement the IPagedDataProvider interface which will provided the adapter with the data which will be presented to the user.

Features

Usage

public class ExtremeSimpleEndlessListActivity extends ListActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_endless_list);

		GenericArrayAdapter adapter = new GenericArrayAdapter(this, new GenericEntryViewProvider(getBaseContext()));
		adapter.setDataProvider(new ExtremeSimplePagedDataProvider());
		
		setListAdapter(adapter);
		
		adapter.new QueryTask().execute();
	}
}
          

Requirements

This Android library works from API level 11 upwards (Android 3.x).

Plans

Documentation

no Javadocs yet

License

This software is released under the BSD 2-Clause License.

Download

A demo APK showing endless list examples can be found in the projects files section. The permission INTERNET is needed to run the demo because the Solr examples need network access to the remote Solr server instance.

Source Code

The source code can be fetched from Sourceforge.net with the following command
hg clone http://hg.code.sf.net/p/andless/endless endless