Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Motion layout compose OnSwipe doesn't work with a horizontal pager with tabs setup #800

Open
Abdulrahman-N opened this issue Mar 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@Abdulrahman-N
Copy link

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.

video: https://streamable.com/5q31m4

@Abdulrahman-N Abdulrahman-N added the bug Something isn't working label Mar 28, 2023
@jafu888
Copy link
Collaborator

jafu888 commented Mar 28, 2023

yes. Motion layout only reacts to its direct children

@Abdulrahman-N
Copy link
Author

I feel like this is a very common use case. Is there any workarounds or a way to fix this?

@jafu888
Copy link
Collaborator

jafu888 commented Mar 30, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants