0

I make my checkbox looks different by drawable:

<item android:drawable="@drawable/ic_shuffle" android:state_selected="true" /> <item android:drawable="@drawable/ic_shuffle" android:state_selected="false" /> 

And in the checkbox on layout I set android:button="@drawable/mix_checkbox"

And it's ok. But for now, how can I set the different colors to those icon's I set? I have to try some ways from here, but unsuccessfully. Help

1 Answer 1

1

Maybe this can help

<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/ic_shuffle" android:state_selected="true" android:color="#000000" /> <item android:drawable="@drawable/ic_shuffle" android:state_selected="false" android:color="#FFFFFF" /> </selector> 
Sign up to request clarification or add additional context in comments.

1 Comment

I have try this one too. The only possibility to change color of custom icon that i find is in separate style set tint. But it's colors all states of checkbox, there is no select effect

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.