Reputation: 6709
I have a 2 list view and I switch between them by making one visible and one invisible.
They both have emptyViews that show when the listView is empty. However, I dont want the emptyView to show if the view is set to invisible regardless of whether it is empty or not.
How can I do this?
Upvotes: 1
Views: 100
Reputation: 83028
You can remove empty
TextView
from layout. If you don't want, you can do it by pragmatically as
TextView empty = getListView().getEmptyView();
empty.setVisibility(View.GONE);
Upvotes: 2