I want to implement up and down a layout that shown in attached GIF but also I want to change the layout as shown in the expected view. You can see in Google Pay app there is bezier curve layout and when we slide-up layout changes to the straight line and when to slide-down then again curve appears.

[![Expected layout change](https://i.stack.imgur.com/0skcB.gif)](https://i.stack.imgur.com/0skcB.gif)