[英]hide/show actionbar tab
Upon install, my app would show only 1 tab, hence I want to hide the tab row. 安装后,我的应用程序仅显示1个标签,因此我想隐藏标签行。
When user login/signup, additional tabs would show up. 用户登录/注册时,将显示其他选项卡。
I create tabs(fragments) in onCreate(). 我在onCreate()中创建选项卡(片段)。
@Override
public void onResume() {
super.onResume();
this.supportInvalidateOptionsMenu();
if(logged_in()){
m_actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
m_actionBar.setSelectedNavigationItem(this.m_previousTabIndex);
}
else
m_actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_STANDARD);
return;
}
I don't see the tabs.. that's good. 我看不到标签页。。很好。
But I don't see the first tab's contents either. 但我也看不到第一个标签的内容。 I don't see nothing but actionBar in screen.
我在屏幕上什么都没看到,只有actionBar。
How do I fix this to show the first tab's contents? 如何解决此问题以显示第一个标签的内容?
我将看一下ActionBarSherlock示例,以了解它们如何工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.