Skip to content

Instantly share code, notes, and snippets.

@PiotrPrus
Created September 25, 2019 18:33
Show Gist options
  • Save PiotrPrus/c6edccd9c74b4f742e653e6803b5bcfe to your computer and use it in GitHub Desktop.
Save PiotrPrus/c6edccd9c74b4f742e653e6803b5bcfe to your computer and use it in GitHub Desktop.
A gist that shows how transitionListener looks like
binding.motionLayoutRoot.setTransitionListener(object : MotionLayout.TransitionListener {
override fun onTransitionTrigger(p0: MotionLayout?, startId: Int, endId: Boolean, p3: Float) {}
override fun allowsTransition(p0: MotionScene.Transition?): Boolean {}
override fun onTransitionStarted(p0: MotionLayout?, startId: Int, endId: Int) {}
override fun onTransitionChange(p0: MotionLayout?, startId: Int, endId: Int, progress: Float) {}
override fun onTransitionCompleted(p0: MotionLayout?, endId: Int) {}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment