React-native-device-info: Android: Support for simulated cutout option in developer tools

Created on 23 Jul 2019  路  2Comments  路  Source: react-native-device-info/react-native-device-info

Feature Request

Android dev tools provide a setting that allows you to simulate a device cutout / notch on any device. Wondering if it might be possible for DeviceInfo.hasNotch() to recognize whether this setting is enabled and to return true if it is enabled.

Why it is needed

It would allow a developer to use a single simulator for testing UI changes both with and without a notch. Otherwise, two simulators are necessary.

android enhancement help wanted

Most helpful comment

Oh that's cool - I didn't even know that existed. I'd love for that to be possible and would merge a PR for that immediately but I'm traveling right now so don't have time to look at it myself

All 2 comments

Oh that's cool - I didn't even know that existed. I'd love for that to be possible and would merge a PR for that immediately but I'm traveling right now so don't have time to look at it myself

I think you might like https://github.com/th3rdwave/react-native-safe-area-context - there's a handy tutorial linked at the bottom of the README that shows it working on an emulator even

Was this page helpful?
0 / 5 - 0 ratings