I have a Expandable List View with a Custom Adapter. With a Spinner, a User can select if he only wants to see specific entries. If he selects something, I want to make every other row that doesnt match his request invisible/gone.
I tried this inside my ListViewAdapters getChildView()
if (special == 0 || special == Integer.parseInt(home) || special == Integer.parseInt(next)) {
return convertView;
} else {
convertView.setVisibility(View.GONE);
return convertView;
}
Unfortunately, it doesnt seem to work. The integer special indicates the selected Item in the Spinner, but I only get an "empty" ListView with all rows in it being empty. So they obviously arent GONE. The problem is that even those rows who fulfill the if-statement arent visible.... anyone knows a better approach?
Thanks in advance