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
Jan
10/06/2022, 12:34 PM
I apply that selector within xml to a View by using _android:background="@color/my_selector"_.
Jan
10/06/2022, 1:23 PM
@kenkyee is there an appropriate channel to post that question somewhere else?
k
kenkyee
10/06/2022, 2:00 PM
read the channel description…there’s the android-united.slack and stackoverflow…. you’re in a Kotlin slack.
kenkyee
10/06/2022, 2:01 PM
all the channels in here are about specific things that are Kotlin related
a
Anselmo Alexandre
10/11/2022, 10:03 AM
@Jan use AppCompat resources to handle the drawable for you in older Android versions. Try to add the drawable programmatically, not directly in xml.