动作条:1项可见,而其余的溢出无论房间 [英] ActionBar: 1 item visible while rest in overflow regardless of room

查看:150
本文介绍了动作条:1项可见,而其余的溢出无论房间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打过所有的showAsAction值无济于事。

我基本上只是想删除按钮可见而出口将进入溢出(3个点)。我会添加更多的溢出之一,但我想知道如何强制退出了进去。

 <菜单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android>
<项目机器人:ID =@ + ID / menu_delete
      机器人:图标=@绘制/ ic_action_delete
      机器人:showAsAction =ifRoom/>
<项目机器人:ID =@ + ID / menu_exit
      机器人:标题=退出
      机器人:showAsAction =collapseActionView/>

先谢谢了。


解决方案

使用的android:showAsAction =从不来强制行动项目进入溢流。

I've played with all the showAsAction values to no avail.

I basically just want the delete button visible while the Exit will go into the overflow (3 dots). I'll be adding more to the overflow one but I'd like to know how to force Exit into it.

<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_delete"
      android:icon="@drawable/ic_action_delete"
      android:showAsAction="ifRoom" />
<item android:id="@+id/menu_exit"
      android:title="Exit"
      android:showAsAction="collapseActionView" />

Thanks in advance.

解决方案

Use android:showAsAction="never" to force an action item into the overflow.

这篇关于动作条:1项可见,而其余的溢出无论房间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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