如何splitActionBarWhenNarrow正是在Android的工作? [英] How does splitActionBarWhenNarrow exactly work in Android?

查看:165
本文介绍了如何splitActionBarWhenNarrow正是在Android的工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

而Android 文档描述splitActionBarWhenNarrow是这样的: 添加一个栏在屏幕显示中的动作条行动项目的底部时,受限于水平空间(例如,当在上一个听筒肖像模式)。

The Android docs describe splitActionBarWhenNarrow like this: "Add a bar at the bottom of the screen to display action items in the ActionBar, when constrained for horizontal space (such as when in portrait mode on a handset)."

但是,如何约束的水平空间定义的?似乎有没有办法当这种分裂发生来定义。

But how is "constrained for horizontal space" defined? There seems to be no way to define when this split occurs.

推荐答案

我使用ActionBarSherlock和操作栏是分裂的时候,屏幕的宽度小于480dp。 此行为是由两个以下资源文件中定义:

I'm using ActionBarSherlock and the action bar is split when the screen width is below 480dp. This behaviour is defined by the two following resource files :

RES /值-w480dp / abs_bools.xml

res/values-w480dp/abs_bools.xml

<resources>
    <bool name="abs__action_bar_embed_tabs">true</bool>
    <bool name="abs__split_action_bar_is_narrow">false</bool>
</resources>

RES /价值/ abs_bools.xml

res/values/abs_bools.xml

<resources>
    <bool name="abs__action_bar_embed_tabs">false</bool>
    <bool name="abs__split_action_bar_is_narrow">true</bool>
</resources>

我没有检查,如果这是相同的行为ICS code,但我是pretty的肯定就是。

I have not checked if this is the same behaviour as in ICS code but I'm pretty sure it is.

这篇关于如何splitActionBarWhenNarrow正是在Android的工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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