如何对齐动作条右侧标签页? [英] How to align the actionbar tabs to the right?

查看:114
本文介绍了如何对齐动作条右侧标签页?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我添加了操作栏标签编程。我不知道该如何操作栏标签右对齐。

 动作条酒吧= 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.

这篇关于如何对齐动作条右侧标签页?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆