I have a RadioGroup with dynamically added RadioButtons. In my Activity, I close the activity immediately after a RadioButton is selected. However, this leads to an artifact where two RadioButtons look like they are selected before the Activity finishes. The previous selection and current selection are both still animating when the Activity finishes.
Is there a way to speed up the animation or disable it altogether so that I don't see this visual artifact?
radioButton.setChecked(true); // previous selected button is still deselecting and current button is now selecting. both are in the middle of animating but activity closes before they can finish animating
finishWithResult(selected == null ? Activity.RESULT_CANCELED : Activity.RESULT_OK, selectedItem);