I have a tabbed layout and an activity using tabs as views. It has three tabs as ListViews
. If either of the lists is empty I want to show a simple TextView>
Have you tried setting the Visibility on each of the ListViews in your java code?
TextView empty = (TextView) findViewById(R.id.blank);
FrameLayout frameLayout = (FrameLayout) findViewById(android.R.id.tabcontent);
mListView_top10 = (ListView)findViewById(R.id.Top_10);
if(TopWR.size()!=0) {
mListView_top10.setVisibility(View.VISIBLE);
mListView_top10.setAdapter(new ArrayAdapter(this,
R.layout.listview_row,TopWR));
}
else {
mListView_top10.setVisibility(View.GONE);
empty.setVisibility(View.VISIBLE);
frameLayout.addView(empty);
}
TextView