In this article Nicolas Roard goes through the examples of how to use MotionLayout with CoordinatorLayout. Also in this codelab there is an example of CoordinatorLayout with MotionLayout.
In both examples the AppBarLayout has a fixed height and it works fine for those examples.
But in my case I need to have AppBar height to be variable depending on the size of the views inside MotionLayout. It turns out that, in my app, with wrap_content height AppBarLayout height is different between start and end states. And because of that, scrolling just breaks the whole AppBarLayout collapsed/expanded states and animations.
Is it possible to have smooth animation of AppBarLayout with wrap_content height but total freedom in start and end states of views in MotionLayout?