I need to filter a ListView in one activity with three tabs. For instance, I have one tab where are displayed info about all the devices (custom object), but when I change to other tab, it should display the devices of “type1” and when I change to the last tab it displays the devices of “type2”.
I already have a custom adapter, and I want to know if I can use the Filterable interface (… implements Filterable …) and override the getFilter() method (like filtering based on editText) or I should use another approach?
Grateful for any kind of help.
I solve this using the
onTabChanged()method, like this (in theonCreate()):