我添加了操作栏标签编程。我不知道该如何操作栏标签右对齐。
动作条酒吧= getActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
//实例化标签
ActionBar.Tab pageTab = bar.newTab()的setText(的getString(R.string.page))
.setIcon(R.drawable.ic_page);
bar.addTab(pageTab);
//其他设置
bar.setDisplayOptions(ActionBar.DISPLAY_USE_LOGO | ActionBar.DISPLAY_SHOW_TITLE);
bar.setDisplayShowHomeEnabled(真正的);
//删除活动标题,使制表符空间
bar.setDisplayShowTitleEnabled(假);
解决方案
动作栏选项卡出现在左侧。右边是用于你的选择菜单,并从它的任何项目,你推广是工具栏按钮。
I added the action bar tabs programmatically. I do not know how to align the action bar tabs to the right.
ActionBar bar = getActionBar();
bar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);
// instantiate tabs
ActionBar.Tab pageTab= bar.newTab().setText(getString(R.string.page))
.setIcon(R.drawable.ic_page);
bar.addTab(pageTab);
// other settings
bar.setDisplayOptions(ActionBar.DISPLAY_USE_LOGO | ActionBar.DISPLAY_SHOW_TITLE);
bar.setDisplayShowHomeEnabled(true);
// remove the activity title to make space for tabs
bar.setDisplayShowTitleEnabled(false);
解决方案
Action bar tabs appear on the left. The right is used for your options menu and any items from it that you promote to be toolbar buttons.
上一篇:移动和周围cirle simulataneously旋转一个三角形:机器人角形、机器人、cirle、simulataneously
下一篇:怎样才可以有previewing永久时为Android捕获视频?才可以、视频、previewing、Android