如何调整在动作条上溢菜单菜单项文本 [英] How to align menu item text in Actionbar overflow menu

查看:95
本文介绍了如何调整在动作条上溢菜单菜单项文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我用ActionBarSherlock来实现我的Andr​​oid应用程序的动作条。不适合这个动作条菜单选项会自动添加到溢出菜单。 我现在面临的问题是,这些菜单选项有居中对齐:

I'm using ActionBarSherlock to implement an actionbar in my Android application. Menu options that don't fit on this actionbar are automatically added to the overflow menu. The problem I'm facing is that these menu options have center alignment:

我如何确保在溢出菜单中的菜单项右对齐,例如像在Gmail应用程序?

How do I make sure that the menu items in the overflow menu are right-aligned, like for example in the Gmail application?

感谢。

推荐答案

没关系,我找到了原因。

Never mind, I found the cause.

原来我是什么地方TextView的造型在我的主题与

It turns out I was styling TextView somewhere in my theme with

<item name="android:gravity">center_horizontal</item>

和这也影响了菜单项。

这篇关于如何调整在动作条上溢菜单菜单项文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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