Android的工具栏没有溢出菜单 [英] Android toolbar without overflow menu

查看:169
本文介绍了Android的工具栏没有溢出菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用一个工具栏,而不是一个动作条,因为我不能用拆分动作条选项,让我实现了两个工具栏一个在顶部,另一个在底部,但即时通讯有一个问题:一些项目在溢出菜单留下了巨大的空白,这是我的工具栏的样子:

I want to use a toolbar instead of an actionBar since i can't use the split actionbar option, so i implemented two toolbars one in the top and the other in the bottom but im having a problem : that some of the items are in the overflow menu leaving a huge empty space this is how my toolbar looks like :

和我需要的是财产以后这样的:

and what i need is somthing like this :

推荐答案

添加此行中的XML布局:

Add this line in your xml layout:

android:showAsAction="always"

让您的项目不会出现在溢出菜单。

so that your items never appear in the overflow menu.

这篇关于Android的工具栏没有溢出菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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