Function

run

On Build.VERSION_CODES.R, we don't receive the onEnd call when an animation is canceled, so we post the value received in onApplyWindowInsets immediately after onPrepare.

run

Source set: Android
override fun run()

On Build.VERSION_CODES.R, we don't receive the onEnd call when an animation is canceled, so we post the value received in onApplyWindowInsets immediately after onPrepare. If onProgress or onEnd is received before the runnable executes then the value won't be used. Otherwise, the onApplyWindowInsets value will be used. It may have a janky frame, but it is the best we can do.

Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: