user1676640
user1676640

Reputation: 635

Change arrow icon background color to blue in my app

I have to develop one ExpandableListView. Here i wish to set the arrow icon background color to blue. The default arrow background color is gray. But i need the arrow background color to be blue in my app. How can i do that?

Upvotes: 0

Views: 5815

Answers (3)

Chris Vaught
Chris Vaught

Reputation: 31

Questions about color went unanswered. Solution would be to alter color in the xml of your vector image.

Open up your vector image and simply change fill color. Or alter bitmap. android:fillColor

Upvotes: 0

Malik Abu Qaoud
Malik Abu Qaoud

Reputation: 208

this is efficient way to set group indicator

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item
    android:state_empty="true" >
    <layer-list>
        <item
            android:left="0dp"
            android:right="3dp"
            android:top="20dp"
            android:bottom="20dp"
            android:drawable="@drawable/ic_arrow_down">
        </item>
    </layer-list>
</item>

<item
    android:state_expanded="false" >
    <layer-list>
        <item
            android:left="0dp"
            android:right="3dp"
            android:top="20dp"
            android:bottom="20dp"
            android:drawable="@drawable/ic_arrow_up">
        </item>
    </layer-list>
</item>

Upvotes: 1

Andro Selva
Andro Selva

Reputation: 54322

I don't think it is possible for you to edit the Default Drawable provided to the Group Indicator. The only option left is to create a Drawable by yourslf and add it as the background to the Group Indicator like explained here.

Upvotes: 2

Related Questions