I am trying to setup an animation for the search v...
# compose
m
I am trying to setup an animation for the search view here. The behavior should be, as soon as the user hit the search bar it should collapse and move to the top right next to the back button*(Screen 2)* and if I hit the back button it should return to the previous position in expanded form*(Screen 1)*.
s
I think you can try with two toolbars, one with a back button and title and the other with a back button and search field upon tapping you can hide the first toolbar and animate/show the second toolbar back button,
c
Maybe AnimatedVisibility? Take a look at this if you haven't seen it:

https://www.youtube.com/watch?v=7yY2OocGiQU&t=8s

m
Thanks @Shakil Karim for the idea and @Colton Idle for sharing this video. This is helpful
c
I’m curious: did this design come from a designer? Wondering since it seems it is meant for iOS and not Android?
m
You figured it right @Chris Sinco [G]. Indeed it came from a designer. 😄 I don’t know why they put iOS specific components in Android. I have raised it already , waiting if they are going to change it. For now, I have implemented it.,
😅 3