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

Bottom container height without anchor point #52

Open
samiede opened this issue Apr 17, 2019 · 9 comments
Open

Bottom container height without anchor point #52

samiede opened this issue Apr 17, 2019 · 9 comments

Comments

@samiede
Copy link

samiede commented Apr 17, 2019

Hey! First of all, awesome library!

I'm trying to set the hight of the expanded bottom sheet without using an anchor point but I can't seem to find any option to do that. Is it possible to get a prop that sets that?

Best wishes!

@cesardeazevedo
Copy link
Owner

Hi, thanks for reaching out,

You can set the height of the bottom sheet by manually setting the hight of the inner <View />, like on the SimpleView.js example https://github.com/cesardeazevedo/react-native-bottom-sheet-behavior/blob/master/example/views/SimpleView.js#L105

Let me know if you got it.

@samiede
Copy link
Author

samiede commented Apr 17, 2019

Thanks for the answer! Yes, that works!
I'm aware this might be suitable for another issue, but what I'm essentially trying to do is recreating the maps example but with the BottomContentHeader when I'm in the expanded view because I need to have another navigation once I'm in expanded view to control the ScrollView inside the container. Since using ScrollView only works when either not using the anchor point or when using the MergedAppBar (at least from what I understood of the library so far), I need to implement a custom design for the MergedAppBar, which is not possible.
My idea now would be to set the height of the Content to the screen height once the User scrolls higher than the expanded position.
Maybe you know another way of achieving this?

Thank you very much!

@cesardeazevedo
Copy link
Owner

I think i am really confused now 😅, do you have a visual example on what you are trying to do?

@samiede
Copy link
Author

samiede commented Apr 18, 2019

Yes sure!

I built a navigation that controls the content of a scrollview and of the content container behind the BottomSheetBehaviour. Collapsed it looks like this:
1
I don't need scrolling behaviour when in anchor state, so at the anchor, it should look like this:
2
But in expanded state, I need the navigation, that I put in the Header to be sticking to the top of the screen with a scrollable list below:
3
I know that it is possible to achieve scrolling when using the MergedAppBarLayout, but that merges the top bar and it is not possible to customize the header the way I need it.
I tried putting an absolute view on top of the scroll view, but it wouldn't display correctly within the CoordinatorLayout.
Thanks for your help! :)

@cesardeazevedo
Copy link
Owner

I have a better understanding now, thanks for clarify, The MergedAppBarLayout is indeed very hard to customized, i think i did something similar on the past, so let me play around and i will back to you.

@cesardeazevedo
Copy link
Owner

Is something like this you're trying to achieve?

test

@samiede
Copy link
Author

samiede commented Apr 18, 2019

Yes, something like that, but with the user being to also scroll down in the expanded state! :)
Basically, the view has a map in the content area, so the original statusbar with the "Google Maps" text in the example is not needed. The BottomSheetHeader basically serves as navigation to control what is displayed in the content of the BottomSheet behaviour, which is supposed to be accessible once the user reaches expanded state.

@cesardeazevedo
Copy link
Owner

Yeah indeed, i think it's a bug on the NestedScrollView that i need to investigate further, if you want to play around, i have this gist so far. https://gist.github.com/cesardeazevedo/e29b3ef261ba5053b614e52dea40f83b

@samiede
Copy link
Author

samiede commented Apr 18, 2019 via email

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