How to remove the border for Share button in Action Bar?

后端 未结 2 624
孤独总比滥情好
孤独总比滥情好 2021-01-22 12:04

Have a look at the picture

\"enter

This is how Share button looks like in action b

相关标签:
2条回答
  • 2021-01-22 12:18

    You need to use custom background.

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

    0 讨论(0)
  • 2021-01-22 12:36

    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.

    0 讨论(0)
提交回复
热议问题