由网友(笑中带伤)分享简介:我试图将操作栏的选项卡,在我的应用程序的底部,但我需要一些帮助它(如果它甚至有可能)。在code:actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);ActionBar.Tab塔巴= actionBar.newTab()的setText(游戏)。Act...
我试图将操作栏的选项卡,在我的应用程序的底部,但我需要一些帮助它(如果它甚至有可能)。
在code:
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ActionBar.Tab塔巴= actionBar.newTab()的setText(游戏)。
ActionBar.Tab塔布= actionBar.newTab()的setText(应用程序)。
ActionBar.Tab TABC = actionBar.newTab()的setText(主题)。
tabA.setTabListener(新ActionBarTabListener());
tabB.setTabListener(新ActionBarTabListener());
tabC.setTabListener(新ActionBarTabListener());
actionBar.addTab(塔巴);
actionBar.addTab(塔布);
actionBar.addTab(TABC);
解决方案
它种违背了Android的指导方针,把卡在底部,而是一个的拆分操作栏应该能完成你想要做的事情。
I'm trying to place the action bar tabs at the bottom of my app, but I need some help with it (if it's even possible).
The code:
actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
ActionBar.Tab tabA = actionBar.newTab().setText("Games");
ActionBar.Tab tabB = actionBar.newTab().setText("Apps");
ActionBar.Tab tabC = actionBar.newTab().setText("Themes");
tabA.setTabListener(new ActionBarTabListener());
tabB.setTabListener(new ActionBarTabListener());
tabC.setTabListener(new ActionBarTabListener());
actionBar.addTab(tabA);
actionBar.addTab(tabB);
actionBar.addTab(tabC);
解决方案
It kind of goes against the Android guidelines to put tabs on the bottom, but a split action bar should be able to accomplish what you're trying to do.
相关推荐
最新文章