Search-Dialog
ajithvgiri
47
Visit GitHub RepoSearch Inputs

Android Arsenal

SearchDialog

Android Search Dialog Library

Setup

1. Provide the gradle dependency

Add it in your root build.gradle at the end of repositories:

	allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

Add the gradle dependency to your app module build.gradle file:

	dependencies {
	        implementation 'com.github.ajithvgiri:search-dialog:v1.2'
	}

2. Initialization of the SearchDialog

model contains id and title

      List<SearchListItem> searchListItems = new ArrayList<>();
      SearchableDialog  searchableDialog = new SearchableDialog(this, searchListItems, "Title");

3. Show the SearchDialog

        searchableDialog.show();

4. Get Selected Item from the SearchDialog

        searchableDialog.setOnItemSelected(new OnSearchItemSelected() {
           @Override
           public void onClick(int position, SearchListItem searchListItem) {
               // searchListItem.getId(); returns id
               // searchListItem.getTitle(); returns title
           }
        });

5. Screen Shots

Search Dialog

Become a better Android Developer
Millions of developers are learning at MindOrks

Online Training Program

Featured Blogs

Our Team

MindOrks is Certainly one of the best online blog to stay on top of all the Android development news, coding and design patterns. Finally a blog I can count on to keep myself updated with latest and greatest things happening in Android world.

Vipul Shah
Android Developer
Microsoft

Become Pro in Android by watching videos

OUR LEARNERS WORK AT