Huawei’s P20 has an iPhone X like notch on the top of the screen. Can this “notch” be emulated in Android Studio so it is possible to test how an app is rendered on it without owning a P20?
I looked in the settings and it is possible to select a “skin” in the Hardware profile but Huawei’s P20 is not part of it.
Follow the screen shots.
first make sure 9.0 (api 28) run in your Emulater or testing device.
Open System settings.
Open Developer option (*if u not found developer option please tap 7 times on build number. after that you get developer option.)
- Scroll Down Until You Found -> Simulate a Display With a Cutout(click on it)
- there is a multiple option to select screen Cutout style.
- if you select Tall Display Cutout , your display is like that.
or if you select Double Display Cutout your display like.
So I googled around and it’s actually possible to emulate the notch in the developer preview of Android P.
To develope against that, you need to setup an emulator running Android P and then set the notch simulation in the developer settings of android.
Here is the official article to setup that notch simulation in Android P Cutout API
Once that is done you can start testing and adapting to the new changes coming with these notches and Android P.
Yes, its possible to simulate notches in the Android Emulator:
- Install Android P
- Enable Developer Options
Follow the Steps( Make Sure You Have Enabled Developer Option Before Doing this):
- Simulate the notch(Inside Developers Options)
- Go to Settings
- Click on System
- Click on Advanced
- Select Developer Options
- Scroll Down Until You Found-> Simulate a Display With a Cutout(CLICK ON IT)
This will trigger a Dialog showing Some Options:
- None (This is the default behaviour)
- Corner Display Cutout(Display’s a Cutout on Corner)
- Double Display Cutout (Shows Notches Up and Down)
- Tall Display Cutout (Shows a tall Notch at the Top)
Select Double Display Cutout or Tall Display Cutout