When using CheckBox
, some Drawable for this "check" icon is created - AnimatedStateListDrawable
. Is there any way to create this drawable programmatically without CheckBox
? The only thing I've found inside CompoundButton
class is this resource - com.android.internal.R.styleable.CompoundButton_button
.
Asked
Active
Viewed 17 times
0
![](../../users/profiles/6795368.webp)
Den
- 1,136
- 1
- 10
- 31
1 Answers
0
Found the solution:
val attrs = intArrayOf(android.R.attr.listChoiceIndicatorMultiple)
val ta = getContext().theme.obtainStyledAttributes(attrs)
ta.getDrawable(0)
For RadioButton it's android.R.attr.listChoiceIndicatorSingle
.
![](../../users/profiles/6795368.webp)
Den
- 1,136
- 1
- 10
- 31