In Viewpager2 i used translationZ = -1fto deal with such issue. In Compose graphicsLayer does not have translationZ. Instead i tried to use Modifier.zIndex(if(page == 0) 4f else 3f) but it did not work. Still page 1 was above page 0.
Is there any other way to implement such page depth animation?
Hi. I am using ViewPager2 and Depth page animation(Page sliding above another page) like this - https://developer.android.com/develop/ui/views/animations/screen-slide-2#depth-page for vertical pager.
I wanted to migrate to Compose pager and still have such animation.
But i have run into a problem. When i scroll down - page 1 appears above page 0, but i want page 0 be above page 1.
https://user-images.githubusercontent.com/5684351/210962411-5bd661e2-40cb-437f-9f07-5b443f3329a8.mp4
In Viewpager2 i used
translationZ = -1f
to deal with such issue. In Compose graphicsLayer does not have translationZ. Instead i tried to useModifier.zIndex(if(page == 0) 4f else 3f)
but it did not work. Still page 1 was above page 0.Is there any other way to implement such page depth animation?
Here is the code for Pager