I\'m just starting to play with MotionLayout
. I have defined an activity layout using MotionLayout
that uses a MotionScene
to hide and sh
You can also just handle the click programmatically from the beginning by removing
altogether. Also it is easy to see whether or not your view is expanded by checking the progress of your transition. So you can programmatically handle it in your java/kotlin file with
yourButton.setOnClickListener {
if (yourMotionLayoutId.progress == 0.0)
yourMotionLayoutId.transitionToEnd
}
This way, it will check if the transition is in the state where it has not occurred (progress will be 0.0) and transition, otherwise, it will do nothing.