问题
Have a look at the picture

This is how Share button looks like in action bar.
Here's the code I use in menu xml file:
<item
android:id="@+id/menu_item_share"
android:showAsAction="ifRoom"
android:title="Share"
android:actionProviderClass=
"android.widget.ShareActionProvider" />
Is it possible to remove that border or change its color?
回答1:
You need to use custom background.
This might help: https://developer.android.com/training/basics/actionbar/styling.html
回答2:
Here is a more complet message :
In your style, add
<style name="_MidipileTheme" parent="android:Theme.Holo.Light">
<item name="android:actionBarItemBackground">@android:color/transparent</item>
</style>
drawable/action_background
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/background_actionBar"/>
</shape>
@color/background_actionBar is your custom background. For me, it's the same background color as actionBar background drawable.
来源:https://stackoverflow.com/questions/20494959/how-to-remove-the-border-for-share-button-in-action-bar