CodenameOne icon indicating copy to clipboard operation
CodenameOne copied to clipboard

Iphone screen shape

Open ddyer0 opened this issue 2 years ago • 4 comments

On Iphones, there is a big no-go area at the top of the screen. Standard codename1 frames do not correctly avoid this area. See screen shot. Also, if held landscape mode, this huge divot is on the left instead of the top, and the frame takes no notice at all, so the divot overlaps with all the critical contents likely to be at the left of the window. This doesn't show up in screen shots, which contain pixels the user cannot see. image image

ddyer0 avatar Sep 08 '22 00:09 ddyer0

https://www.codenameone.com/blog/safe-areas.html This should sort that

jnorth515 avatar Sep 08 '22 07:09 jnorth515

Looks promising. The safe areas seems to be somewhat larger than necessary to avoid the obstacles, but I can deal with that.

ddyer0 avatar Sep 08 '22 19:09 ddyer0

This almost solves the problem, except that when the notch is placed at the right, getSafeArea still reports that its on the left. This results in pictures like this. image

I would be most convenient if this bug were fixed by changing the value returned to a 4 side insets rather than a rectangle.

ddyer0 avatar Sep 09 '22 01:09 ddyer0

It may be better to file a new issue regarding what you have found and your suggestion

jnorth515 avatar Sep 09 '22 07:09 jnorth515