1

I have added a social sharing button to actionbarsherlock via the built-in process for doing so. That sharing item shows up with a border around it. How can I remove that border? I don't know if the border is in the 9-patch images, styles, themes, or what. For all I know it could even be a default Android style. Can someone please point me to where I can change it?

The XML for the menu is below:

<item 
   android:id="@+id/show_share_menu" 
   android:title="Share Menu"
   android:actionProviderClass="com.actionbarsherlock.widget.ShareActionProvider">
4

1 回答 1

2

您可以通过从 Sherlock Theme 扩展来创建自己的应用程序主题,并activityChooserViewStyle使用这样的空白(空)背景样式覆盖

<style name="Theme.CustomTheme" parent="Theme.Sherlock.Light">
    <item name="activityChooserViewStyle">@style/ActionBar.ActivityChooser</item>
</style>

<style name="ActionBar.ActivityChooser" parent="Widget.Sherlock.Light.ActivityChooserView">
    <item name="android:background">@null</item>
</style>

或像这样使用默认的 Sherlock 活动选择器样式

<style name="Theme.CustomTheme" parent="Theme.Sherlock.Light">
    <item name="activityChooserViewStyle">@style/Widget.Sherlock.ActivityChooserView</item>
</style>

然后将 AndroidManifest.xml 中的应用程序主题更改为您的自定义主题。

于 2013-01-18T11:18:16.813 回答