Temporarily disable animation on Lollipop CheckBox

I have a ListView with strings that include CheckBoxes. This ListView has an attached filtering that processes these rows, setting new data (using the simple setData() method) as the filter criteria changes. When this happens, any processed line that changed the checked state will update its CheckBox, which in turn causes the Lollipop animation in the CheckBox to be inserted or exited.

The ways in which this distracts the user are numerous. How can I temporarily disable this animation when its state is programmatically updated?

+7
android checkbox android-5.0-lollipop
source share
1 answer

Calling jumpDrawablesToCurrentState() in your CheckBox right after calling setChecked will skip the animation.

+6
source share

All Articles