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.

Modal's height is unpredictable in android full screen gestures mode(with notch)

See original GitHub issue

🐛 Bug Report

I am using react native modal in my app and it is cutting from bottom sometimes in new android devices having notch and full screen gesture mode. This only happen when navigation bar from bottom is hidden. May be react native is not getting exact height often to show up the modal. screenshot gif.

To Reproduce

  1. Using React Native’s modal and running the app. This issue is not in every modal but in specific scenes(may be router flux or some library is breaking).
  2. This definitely happens the first time modal opening, and rarely in next attempts.

Expected Behavior

Modal should take full height every time like the app is taking.

Code Example

<View style = {{flex: 1}}> <View style = {{height: '91%'}}> <Modal animationType = {"slide"} transparent = {false} onRequestClose = {!this.state.showModal2 ? this.closeModal: this.closeModal2} supportedOrientations={['portrait', 'landscape']} style = {[]} > <SafeAreaView style={{backgroundColor: '#34485E'}}> <View style = {[ { position : 'relative', top : 0, right : 0, bottom : 0, left : 0, height : height*.95, backgroundColor: '#fff' } ]} > <MyComponent /> </View> </SafeAreaView> </Modal> </View> </View>

Environment

info React Native Environment Info: System: OS: Windows 7 CPU: (4) x64 Intel® Core™ i3-4005U CPU @ 1.70GHz Memory: 6.57 GB / 7.91 GB Binaries: npm: 6.4.1 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 3.3.0.0 AI-182.5107.16.33.5314842

Below are my project details. “dependencies”: { “art”: “^0.10.3”, “babel-plugin-transform-remove-console”: “^6.9.4”, “buffer”: “^5.2.1”, “crypto-js”: “^3.1.9-1”, “events”: “^3.0.0”, “firebase”: “^5.10.0”, “moment”: “^2.24.0”, “react”: “16.8.3”, “react-native”: “0.59.3”, “react-native-autoheight-webview”: “^1.1.2”, “react-native-color-picker”: “^0.4.0”, “react-native-device-info”: “^1.4.2”, “react-native-fs”: “^2.13.3”, “react-native-google-signin”: “^1.2.2”, “react-native-orientation-locker”: “^1.1.5”, “react-native-pdf”: “^5.0.12”, “react-native-restart”: “0.0.10”, “react-native-router-flux”: “^4.0.6”, “react-native-svg”: “^9.4.0”, “react-native-tts”: “^2.0.0”, “react-native-vector-icons”: “^6.4.2”, “react-native-webview”: “^5.7.1”, “react-native-zip-archive”: “^4.0.0”, “realm”: “^2.26.1”, “rn-fetch-blob”: “^0.10.13”, “stream”: “0.0.2”, “timers”: “^0.1.1”, “xml2js”: “^0.4.19” } and TabViewAnimated also.

device details:-

Model number: Redmi 6 Pro Android version: 8.1.0 RAM: 3GB

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:8
  • Comments:10

github_iconTop GitHub Comments

2reactions
RudskikhIvancommented, Jun 10, 2019

Have the same bug when bottom navigation bar is turned off Device: MI 8 Android version: 9

1reaction
chenKunyangcommented, Aug 8, 2019

same issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

[MODULE] Fullscreen/Immersive Gestures tweaks for Android ...
This Magisk Module lets you tweak Android 10-13's gestures. ... it's only possible to disable them completely and on fullscreen mode only, ...
Read more >
Features and APIs Overview | Android Developers
Note: If you do not set the window to LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS , Android displays the window in letterboxed mode, avoiding the notch and ...
Read more >
Fully Kiosk Browser & App Lockdown Help
Android kiosk browser and app lockdown for interactive kiosk systems, digital signages and other unattended tablets with fullscreen and kiosk mode.
Read more >
android - How to detect full screen gesture mode in Mi devices ...
Just make any view take full width and height of the screen (MATCH_PARENT) then get it's dimensions, it well give accurate numbers. Share....
Read more >
Google Pixel Android 12 bugs, problems, & issues tracker ...
IST 09:03 PM: Several users had called for the removal of the gesture bar/pill from the Pixel Launcher home screen and lock screen...
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