Last active
March 23, 2020 21:04
-
-
Save tmaxxdd/9aab8da82ecf1e68409b4315d5d249cd to your computer and use it in GitHub Desktop.
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