I see examples of selectors using android states like 'selected' to define style. Here a simplified example:
<selector>
<item android:state_selected="true" android:drawable="@color/transparent" />
<item android:drawable="@drawable/listitem_normal" />
</selector>
So, my question is: Can I define and use my own state instead of
android:state_selected="true"
My goal is to color shapes based on an integer value, like simple version of this heatmap: