Skip to content

Instantly share code, notes, and snippets.

@armcha
Created September 11, 2018 13:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save armcha/d6f60f6a2cffc1cfbfac9828bb658a9b to your computer and use it in GitHub Desktop.
Save armcha/d6f60f6a2cffc1cfbfac9828bb658a9b to your computer and use it in GitHub Desktop.
videoMotionLayout.addTransitionListener(object : MotionLayout.TransitionListener {
override fun onTransitionChange(motionLayout: MotionLayout?, startId: Int, endId: Int, progress: Float) {
val mainActivity = activity as MainActivity
mainActivity.mainMotionLayout.progress = Math.abs(progress)
}
override fun onTransitionCompleted(motionLayout: MotionLayout?, currentId: Int) {
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment