'How to detect MotionLayout's ConstraintSet change?

How to do something when the screen show a specific constraintSet after transitioning?

I have a DialogFragment and use MotionLayout with it, and I want to dismiss the dialog when swiped down. I haven't found any Listener for ConstraintSet changes.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source