我已经以编程方式添加了操作栏选项卡。我不知道如何将操作栏选项卡对齐到右侧。
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);