Time for action - filtering the list

Although the code is all set up to display the list, and even to filter it, we haven't yet attached the EditText box to the ListView, so typing in the EditText will have absolutely no effect at the moment. We need to listen for changes to the EditText box, and request that the ListView be filtered based on what is typed. This will involve the ListItemSelectionActivity class listening for events on the EditText and then asking the Filter object to narrow the available set of items.

  1. The ListItemSelectionActivity should be made to implement the TextWatcher interface:
    public class ListItemSelectionActivity extends Activity implements TextWatcher
    
  2. After setting the ListAdapter on the ListView in the onCreate method, ...

Get Android User Interface Development now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.