An Android list dialog showing list of items, with an EditText to filter items given in the list.
dependencies {
compile 'me.rohanpeshkar.filterablelistdialog:filterablelistdialog:0.0.1'
}
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.