[英]How can I center a menu item in an action bar?
How can I center a menu item in an action bar? 如何在操作栏中将菜单项居中? I am using an image icon in action bar as menu but it appears at the right side of the action bar and I want to center it.
我在操作栏中使用图像图标作为菜单,但它显示在操作栏的右侧,我想将其居中。 Is it possible in android ?
在Android中可能吗?
This can be done using custom views in actionbar. 可以使用操作栏中的自定义视图来完成此操作。 In native actionbar view you can't set alignment of menu items .
在本机操作栏视图中,您无法设置菜单项的对齐方式 。 Check here another SO post for custom action bar
在此处查看其他SO帖子以获取自定义操作栏
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.