I have an State List, which I assign to elements in my List view.
Here is a Selector:
<item android:state_pressed="true">
<shape android:shape="rectangle">
<solid android:color="#1E90FF"/>
<stroke android:width="2dp"
android:color="#000000"/>
</shape>
</item>
<item>
<shape android:shape="rectangle">
<solid android:color="#FFFFFF"/>
<stroke android:width="2dp"
android:color="#000000"/>
</shape>
</item>
I need to realize, that user may choose a color for elements without losses stroke and accentuation state_pressed="true"
.
How I can programmatically change the color in my state list?