I have a checkbox for which i need to change the color on checked state programmetically.
For api >= 21, I can change with
buttonTintList = ColorStateList(arrayOf(intArrayOf(-android.R.attr.state_checked), intArrayOf(android.R.attr.state_checked)), intArrayOf(Color.WHITE, color))
But for api < 21 , I couldn't find any method. Is there any way to change color programmetically for api<21. Also view should be checkbox, it shouldn't be appcompatcheckbox view.
Actually found the answer to change color of checkbox for api < 21.
This is actually supporting for all api's.