In the material design guide there is a section called "Display processing status" where we see a video of a Switch with a progress indicator on the thumb.
https://material.io/design/components/selection-controls.html#switches
Because a switch shows the actual status of something, sometimes there is a delay in its change of state. In such cases, a processing status animation can be used.
A processing status is an animation on the thumb of the switch. For example, it can be used when a switch that controls a hardware feature experiences a delay before its final status can be confirmed.
How can I achieve such an effect? is that part of the normal CompatSwitch? Is there a library that does this?