Hello everyone !
I am building a Screen which has a common shared background with the TopAppBar and the content below it.
Following is the node structure of the views in the Screen:
Scaffold
- TopAppBar
- Header Composable (Carousel like View, a Horizontal ViewPager)
- ListContent Composable
The TopAppBar and the Header Composable should share the same background, which will need to be drawn using Canvas(I'm still pondering over this though), since it will be quite dynamic with lot of colors. Also, there is a Parallax effect, on the Header, when the Header is scrolled up and not visible, the background of the TopAppBar should become White.
What I have so far is the parallax effect, by controlling the
translationY
property in the
graphicsLayer
for Header and some elevation is added to the ListContent so, it seems like it is hiding the Header while scrolling up. However, where I'm stuck is figuring out how to have a common background for the TopAppBar and the Header 🤔
Any ideas appreciated !
Thanks !