<!-- 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
菜單中包含摺疊視圖,當展開時,這個視圖將接管其容器的較大部分。