question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bottom sheet snap too high causing back layout exposed at bottom

See original GitHub issue

I’m not sure if I am doing this correctly, but my bottom sheet is always snapped too high when opened, resulting in the bottom part being exposed to my main layout. Is it because of safeareaview? I tried changing snapPoints[0] to a fixed number, adjusting the height, adding margins to renderInner View but it doesn’t work.

renderInner = () => (
          <View style = {{
              backgroundColor: '#fff000',
              height: '100%',
          }}>
              <Text>Copy</Text>
          </View>
      )

<SafeAreaView>
<MyMainContent />
 <BottomSheet
                    ref={this.bs}
                    snapPoints = {['100%', '0%']}
                    initialSnap={1}
                    renderContent = {this.renderInner}
                />
</SafeAreaView>

IMG_0287

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

4reactions
mnjongeriuscommented, Dec 12, 2019

I solved this by placing the BottomSheet outside of the SafeAreaView

1reaction
asharafshahicommented, Oct 22, 2019

I also had this problem when the top most container View had padding. When I removed the padding (even just paddingTop), the bottomSheet aligned with the bottom of the screen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sheets: bottom - Material Design
When bottom sheets initially appear on screen, they may contain content that extends below the bottom of the screen. They can be swiped...
Read more >
Props | React Native Bottom Sheet - GitHub Pages
This will initially mount the sheet closed and when it's mounted and calculated the layout, it will snap to initial snap point index....
Read more >
Animation | Jetpack Compose - Android Developers
Many Jetpack Compose Animation APIs are available as composable functions just like layouts and other UI elements, and they are backed by lower-level...
Read more >
Fall Hazard Recognition, Prevention & Control –
Factors that contribute to falls from ladders are ladder slip (top or bottom), overreaching, slipping on rung/steps, defective equipment, and improper ladder ...
Read more >
SNAP Frequently Asked Questions (FAQs)
Get in-depth explanations on how to apply for SNAP. ... How much could I receive in benefits? To receive SNAP ... I applied...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found