Home

Awesome

Android - MultiStateListView

A simple Android ListView that lets you define three states:

Screenshots

alt text  alt text  alt text  alt text

Usage

<com.jensdriller.libs.multistatelistview.MultiStateListView
        android:id="@+id/list"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        custom:emptyView="@layout/empty_view"
        custom:errorView="@layout/error_view"
        custom:loadingView="@layout/loading_view" />
  MultiStateListView multiStateListView = new MultiStateListView.Builder(this)//
  .loadingView(R.layout.loading_view)//
  .emptyView(R.layout.empty_view)//
  .errorView(R.layout.error_view)//
  .build();
  multiStateListView.showLoadingView();
  multiStateListView.showEmptyView();
  multiStateListView.showErrorView();

Example

Check out the sample project for an example implementation.

Download

Grab it via Gradle:

compile 'com.github.jenzz.multistatelistview:library:1.0'

or Maven:

<dependency>
  <groupId>com.github.jenzz.multistatelistview</groupId>
  <artifactId>library</artifactId>
  <version>1.0</version>
</dependency>

License

This project is licensed under the MIT License.