如何prevent动作条标签,显示为下拉列表? [英] How to prevent actionbar tabs showing as to drop down list?

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

问题描述

试图用默认的项目动作条+选项卡,由ADT插件创建玩。
在一些设备上的标签移到屏幕旋转后的下拉列表中。

Trying to play with default project actionbar+tabs, created by ADT plugin. On some devices tabs moved to drop-down list after screen rotation.

Android开发者指南

Android developer guide says:

注意:在某些情况下,Android系统将显示以保证操作栏中最适合你的动作条的标签为下拉列表

Note: In some cases, the Android system will show your action bar tabs as a drop-down list in order to ensure the best fit in the action bar.

但是,如果我想禁用此功能,并显示始终标签,还有就是做正确的方式?

But if I want to disable this feature, and show always tabs, there is a right way to do it?

推荐答案

有没有办法做到这一点,据我所知。我提交的这个非常一点一个问题,是告知,这是按设计工作。

There is no way to do it, AFAIK. I filed an issue on this very point and was told that it was working as designed.

最简单的方法,恕我直言,是不使用操作栏的选项卡,而是切换到 ViewPager 和标签它( PagerTabStrip ,从ViewPagerIndicator标签指示,等等)。

The simplest solution, IMHO, is to not use action bar tabs, but instead switch to ViewPager and tabs for it (PagerTabStrip, tabbed indicator from ViewPagerIndicator, etc.).

这篇关于如何prevent动作条标签,显示为下拉列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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