Why canvas does not expands to full screen on android?


android device screen shot

You can see ‘black figure’ node is present on top left corner in above scree shot, I attached Widget component with it and assigns top left to the screen. As you can see it’s not exactly top left which shows that canvas it self is not expanded to full screen on android devices as it does on browsers

Does I need to config the full screen canvas in Android Studio?

I have attached the sample project, please have a look at it
sample.zip (475.6 KB)

Is your device’s screen ratio 1: 2 of 1:2+?

design resolution of canvas is 800x480
device physical screen resolution is 720 x 1440 (2:1 aspect ratio)
Above screen is in portrait mode,

I just found this function
http://docs.cocos2d-x.org/creator/api/en/classes/View.html#setframesize
First detecting the screen resolution and setting it on native devices may fix the issue

<meta-data android:name=“android.max_aspect” android:value=“2.1” /> adding this to manifest may help.