在操作栏中福尔摩斯填充菜单项 [英] Padding menu items in action bar sherlock

查看:103
本文介绍了在操作栏中福尔摩斯填充菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有行动酒吧标题名称 搜索操作溢菜单项,虽然我使用ActionBarSherlock库本。我想删除填充搜索和操作溢出菜单项,在行动吧。

I'm having action bar which Title Name, Search and Action Overflow menu item, though i'm using ActionBarSherlock library for this. I want to remove padding for search and Action Overflow menu item in action bar.

推荐答案

检查此链接:

<一个href="http://stackoverflow.com/questions/10759282/actionbarsherlock-how-to-set-the-padding-of-each-actionbars-icon#answers-header">ActionBarSherlock - 如何设置每个动作条的图标的填充

我们的想法是创建一个新的主题,其中有一个父主题为 Theme.Sherlock

The idea is to create a new theme which has a parent theme as Theme.Sherlock

和较低的 actionButtonStyle 了minWidth 属性

<style name="MyTheme" parent="Theme.Sherlock">
    <item name="actionButtonStyle">@style/MyActionButtonStyle</item>
</style>

<style name="MyActionButtonStyle" parent="Widget.Sherlock.ActionButton">
    <item name="android:minWidth">28dip</item>
</style>

和应用这个主题到您的清单中的活动。

and apply this theme to your Activity in the manifest.

这篇关于在操作栏中福尔摩斯填充菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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