I wanted to create a nice search box with autocomplete results dropdown in the ActionBar. I could have used the SearchView widget but I didn't want to create a searchable activity and all the necessary overhead. Instead I used a more lightweight approach with AutoCompleteTextView. I'll explain here the steps needed to be done in order to make it work.
Sometimes we want from our application, to provide suggestions to the user, when he/she types in an editable text field. We can do that via AutoCompleteTextView, that gives suggestions automatically and display them to a drop down menu, from which the user can choose a preferred item. Moreover, Android give us the opportunity to input multiple items than only one, in the editable text field by using MultiAutoCompleteTextView class. Through this example, the user is allowed to ender one and/or multiple items in an edit text, where suggestions automatically are displayed on the screen.