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

Inset Pager with overflow #15

Open
deehuey opened this issue Oct 21, 2017 · 2 comments
Open

Inset Pager with overflow #15

deehuey opened this issue Oct 21, 2017 · 2 comments

Comments

@deehuey
Copy link

deehuey commented Oct 21, 2017

Hey! 2 questions tonight :)

Product requires that our "pages" be slightly visible to indicate that one can swipe to the next page. I've experimented with containerStyle and a few other things to get the next page to be peeking, but can't seem to achieve this, it seems to always cut off where i've padded / added margin, even with 'overflow': 'visible'

Desired result:

image

Where those 'cards' are each child. You can see that the next page is bleeding into the current. I can achieve this with a horizontal scroll view, but the pages don't "LOCK" like I want them to.

Is this possible with your library do you think?

Thanks :)

-Dan

@deehuey
Copy link
Author

deehuey commented Oct 21, 2017

Actual result:

image

@n4kz
Copy link
Owner

n4kz commented Oct 30, 2017

Thanks for question, that's a really challenging task!

After some experiments I can tell that this is possible out of the box (even in example project):

  1. <Pages style={{ transform: [{ scale: 0.67 }], overflow: 'visible' }}> for Pages component
  2. <View style={{ transform: [{ scale: 0.9 }] }}> for page container
  3. <View style={{ overflow: 'hidden' }}> for view containing Pages

screen shot 2017-10-30 at 22 55 06

Drawback: ScrollView sides are inactive (no taps or swipes), however this is a good starting point. I'll look further for more complicated and universal solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants