menu中showAsAction

<!-- 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
    • 菜单中包含折叠视图,当展开时,这个视图将接管其容器的较大部分。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值