I\'m just starting to play with MotionLayout
. I have defined an activity layout using MotionLayout
that uses a MotionScene
to hide and sh
In general if you need a callback you probably will want to control the animation yourself. So if you are adding an onClick you should call the transition yourself.
public void onClick(View v) {
((MotionLayout)v.getParent()).transitionToEnd());
// you can decide all the actions and conditionals.
}
The intent was is useful what the developer does not care. hide/reveal of ui elements etc. or for testing before you get to wiring up the callbacks.