操作栏上的图标优先图标、栏上、操作

2023-09-07 17:45:36 作者:梦想才让心跳存在

如果显示一个操作栏上用几个图标机器人:showAsAction =ifRoom并没有足够的空间所有图标,机器人如何决定,有什么图标显示?是否有可能设置相对重要性的图标?

If several icons are shown on an action bar with android:showAsAction="ifRoom" and there is no enough space for all icons, how Android decides, what icon to show? Is it possible to set relative icons importance?

推荐答案

您应该使用的android:orderInCategory ,从的文档:

整数。的项目的重要性,在组内的顺序。

Integer. The order of "importance" of the item, within a group.