- 在设备上启用开发模式。
- 模拟切口(选择“高切口”选项)。
getWindow().getDecorView().getRootWindowInsets().getDisplayCutout()返回null。
但是对于“双切口”,它会返回正确的结果。
设备:搭载 Android 10 的 Pixel 3。
getWindow().getDecorView().getRootWindowInsets().getDisplayCutout()返回null。但是对于“双切口”,它会返回正确的结果。
设备:搭载 Android 10 的 Pixel 3。