Motion layout compose OnSwipe doesn't work with a horizontal pager with tabs setup
Abdulrahman-N opened this issue · 3 comments
Abdulrahman-N commented
When creating a motion scene with a transition onSwipe on a horizontal pager
and if a child of the pager has a vertical scroll modifier and gets scrolled the onSwipe transition won't get triggered and participate in the scrolling.
jafu888 commented
yes. Motion layout only reacts to its direct children
Abdulrahman-N commented
I feel like this is a very common use case. Is there any workarounds or a way to fix this?
jafu888 commented
I am not sure exactly what you want. Build a skeleton and I will try and code a work around.
My understanding so far:
- MotionLayout
- TopAreaWidget1
- TopAreaWidget2
- Pager
- ScrollPane1
- panel2
You want the ML to react to ScrollPane1.
What happens when you switch to panel2 ?
If panel2 is not a ScrollPane:
- then what is that to look like.
- What is the scrollPosition of a non ScrollPane
- MotionLayout will be changing the size of pager what happens to panel2
Given the design questions consider:
- Pager
- MotionLayout
- TopAreaWidget1
- TopAreaWidget2
- ScrollPane1
- panel2
- MotionLayout