Best android open-source packages and libraries.

FilterableListDialog

A list dialog with option of filtering the list items
Updated 2 years ago

FilterableListDialog

An Android list dialog showing list of items, with an EditText to filter items given in the list.

Current Version Minimum SDK

Usage

Gradle Dependency

dependencies {
    compile 'me.rohanpeshkar.filterablelistdialog:filterablelistdialog:0.0.1'
}

Using Dialog

Using list dialog is pretty simple, it needs a list of items to be shown in dialog. For now it needs to be ArrayList<String>. Example Usage :

FilterableListDialog.create(this, getListItems(),
             new FilterableListDialog.OnListItemSelectedListener() {
                 @Override
                 public void onItemSelected(String item) {
                      //Use selected item as needed
                    }
                 }).show();

getListItems() will return list of items to be shown in dialog.

Warning: Please remember to call show() method as FilterableListDialog.create() will only return the instance and does not show the dialog.