Hi, I have a question regarding a ColorStateListRe...
# android
j
Hi, I have a question regarding a ColorStateListResource: 1. In my res/color folder I have created a color list selector resource, see https://developer.android.com/guide/topics/resources/color-list-resource 2. Its working fine e.g. on Android 11 3. It crashes e.g. on Android 6.0.1 with: XmlPullParserException: <item> tag requires a 'drawable' attribute ... If I create a drawable list selector under res/drawable its working as well, but thats not what I want. Is that a known issue in some of the jetpack libraries I am using or something else? Thanks ...
😶 1
👋 1
stackoverflow 1
I apply that selector within xml to a View by using _android:background="@color/my_selector"_.
@kenkyee is there an appropriate channel to post that question somewhere else?
k
read the channel description…there’s the android-united.slack and stackoverflow…. you’re in a Kotlin slack.
all the channels in here are about specific things that are Kotlin related
a
@Jan use AppCompat resources to handle the drawable for you in older Android versions. Try to add the drawable programmatically, not directly in xml.
j
@Anselmo Alexandre thanks for your response