我有一个带有列表视图和另一个活动的选项卡。那是我的代码:
TabHost tabHost = getTabHost();
TabHost.TabSpec spec;
Intent intent;
intent = new Intent().setClass(this, ListNoteActivity.class);
spec = tabHost.newTabSpec("list").setIndicator(getString(R.string.list),
res.getDrawable(R.drawable.ic_tab_new)).setContent(intent);
tabHost.addTab(spec);
intent = new Intent().setClass(this, NewNoteActivity.class);
spec = tabHost.newTabSpec("view").setIndicator(getString(R.string.view),
res.getDrawable(R.drawable.ic_tab_new)).setContent(intent);
tabHost.addTab(spec);
tabHost.setCurrentTab(0);
如果选项卡 0 中的列表为空,如何显示消息或 TextView?