Android: Full Screen in notched screen device

I have project base on Cocos Creator v2.4.2, when I build Android and test in notched screen device such as the Nokia 6.1, my app not truly full screen, it have 2 black space, one on notched area and one on system navigator area. I don’t use SafeArea component in my project, but seem like cocos auto use them. How can I make the app truly full screen, ignore safe area?

1 Like

Hi, why don’t you use the SafeArea component?
Or you could try using a multi-resolution adaptation scheme.

In my project, I used Auto fit for multi-resolution. Design Resolution: 1334x750, Fit Width. In device don’t have notched area or device with hard navigator, everything work perfect. But, in notched screen device or device with soft navigator, canvas not full and balance (not fit in center because notched area smaller than system navigator area), it have 2 black space. So, Do you know anything way to set canvas truly full screen?

Is this only a problem on Android? Is it a problem on Web platform? Can you please provide a demo for us to verify?

It’s a problem on Android Native (I have not test on iOS yet), it’s not a problem on Web platform. In my test on Nokia 6.1, when build with cocos creator 2.3.4, my app truly full screen. But, when build with cocos creator 2.4.2, it’s always cut off notched area and navigator area.
Demo1 - Build with Cocos Creator 2.3.4
Demo1 - Build with Cocos Creator 2.4.2

Sorry, but what we need is a project that can reproduce the problem, not apk, otherwise we can’t be sure if it’s a setting in the project that’s causing the problem.

I create 2 simple project and result of them:
Project base on Cocos Creator 2.3.4
Project base on Cocos Creator 2.4.2

With same Project base on Cocos Creator 2.4.2, when I run it on device with hard navigator and no notched area as Nokia 6, it truly full screen. So, I guest this problem only on notched screen device

1 Like

@yufang.wu I tested on the OPPO F11 and it same a problem.

I guess, Cocos Creator v2.4.2 is not return full screen size, it’s always return size after cut off navigator area and notched area. Example, on Nokia 6.1, Cocos Creator v2.4.2 return 2065 x 1080, but Cocos Creator v2.3.4 return 2280 x 1080 (truly full screen size)

can you give me your oppo F11’s android version?

OPPO F11: Android 10
Nokia 6.1: Android 10
Nokia 6: Android 9

OK, we will check it as soon as possible

1 Like

Hello, I check the code, you can just remove this line, or upgrade to CocosCreator 2.4.3 if you need SafeArea component.

I tested and it works, thank you for your support!

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.