Q: Filter one list android depending on other list I have 2 lists with in 2 different adapters. The first list displays categries, the second one names. Something like:
List 1
- Dogs
- Cats

List 2
- Pluto (Dogs)
- Oliver (Cats)
- Billo (Cats)

The second list includes the category (an hidden textview in the item.xml). What I would like to do is that on click of item "Dogs" the second list should show me only the item "Pluto", or tapping on "Cats" the second list should show "Oliver" and "Billo".
I tried this scenario in following way; The first list with its adapter 
adapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_list_item_1, android.R.id.text1, categories);
                    listView.setAdapter(adapter);

and then the item click
listView.setOnItemClickListener(new AdapterView.OnItemClickListener() {
                        @Override
                        public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
                            String itemValue = (String) listView.getItemAtPosition(position);
                            getAdapter().getFilter().filter(itemValue);
                        }
                    });

This getAdapter().getFilter().filter(itemValue) should filter the second list but it doesn't work. When i tap one of the item the items of the second list disappear. But, if I try in this way
getAdapter().getFilter().filter("Pluto");

it works. And it filters the second list. I can't understand why doesn't work using the categories
