I have an actionbar with a logo, a title, 2 tabs and a search function.
On a phone (3.5") everything works fine.
The actionbar has 2 lines. The logo title and the search function appear on the first line and the tabs apear on the second line.
On my tablet (7") everyting is shown on a single line. But the tabs will be convert to a list when i click the search icon.
如何在我的 7 英寸平板电脑上将 (sherlock) 操作栏分成两行?
或者有其他方法可以解决这个问题吗?
在ActionBarSherlock中,有一个布尔值(abs__action_bar_embed_tabs)决定Tab是否应该嵌入到ActionBar中,这个值存储在两个文件中。
- 在值/abs__bools.xml中。这是假的。
- 在值-w480/abs__bools.xml 中。是真的。
这意味着仅当设备宽度大于 480dp 时才会嵌入选项卡。
如果你想自己控制这一切,你可以在自己的项目中创建values-w480,并将abs__action_bar_embed_tabs设置为false以覆盖库项目中的值。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)