react-native-reanimated-bottom-sheet
react-native-reanimated-bottom-sheet copied to clipboard
Question: How to set appropriate snap point for different screen sizes?
I want to set the snap point of BottomSheet such that it only takes the height of it's content. I tried percentages and device height to achieve the same, but the results are not satisfactory on different screen sizes.
If I try to set appropriate snap point for devices with larger height, some content(lower) of BottomSheet gets hidden on devices with small height. If I try to set appropriate snap point for devices with small height, a lot of empty space is left on BottomSheet on devices with large height.
Same issue here!
You can use onLayout prop of View in order to calculate the height of the content and set snapPoints dynamic based on this!
You can use onLayout prop of View in order to calculate the height of the content and set snapPoints dynamic based on this! Good idea, but if the content is inside of the BottomSheet component, the height will not be known initially right?