Question

Have a look at the picture

enter image description here

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?

Was it helpful?

Solution 2

You need to use custom background.

This might help: https://developer.android.com/training/basics/actionbar/styling.html

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top