This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MotionProgressListener(private val progressListener: (Float) -> Unit) : | |
MotionLayout.TransitionListener { | |
override fun onTransitionTrigger(layout: MotionLayout?, triggerId: Int, positive: Boolean, progress: Float) {} | |
override fun onTransitionStarted(layout: MotionLayout?, startId: Int, endId: Int) {} | |
override fun onTransitionChange(layout: MotionLayout?, startId: Int, endId: Int, progress: Float) { | |
progressListener.invoke(progress) | |
} | |
override fun onTransitionCompleted(layout: MotionLayout?, currentId: Int) {} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment