<!-- How this item should display in the Action Bar, if present. -->
<attr name="showAsAction">
<!-- Never show this item in an action bar, show it in the overflow menu instead.
Mutually exclusive with "ifRoom" and "always". -->
<flag name="never" value="0"/>
<!-- Show this item in an action bar if there is room for it as determined
by the system. Favor this option over "always" where possible.
Mutually exclusive with "never" and "always". -->
<flag name="ifRoom" value="1"/>
<!-- Always show this item in an actionbar, even if it would override
the system's limits of how much stuff to put there. This may make
your action bar look bad on some screens. In most cases you should
use "ifRoom" instead. Mutually exclusive with "ifRoom" and "never". -->
<flag name="always" value="2"/>
<!-- When this item is shown as an action in the action bar, show a text
label with it even if it has an icon representation. -->
<flag name="withText" value="4"/>
<!-- This item's action view collapses to a normal menu
item. When expanded, the action view takes over a
larger segment of its container. -->
<flag name="collapseActionView" value="8"/>
</attr>
- never
不显示在界面上,只让出现在右边的三个点中
- ifRoom
如果有位置才显示,不然就出现在右边的三个点中
- always
始终在actionbar中显示此项
- withText
这个值使菜单和它的图标,菜单文本一起显示
- collapseActionView
菜单中包含折叠视图,当展开时,这个视图将接管其容器的较大部分。