SafeArea not working for a Form displaying an overflow menu or a Dialog

Viewed 61

I've noticed on iPhone Xr with iOS 13.3.1 that the new support for SafeArea (https://www.codenameone.com/blog/safe-areas.html) is not working in (at least) a few situations.

When setSafeArea(true) is set for a Form it displays correctly within the safe area. But when the Form opens the Toolbar overflow menu or displays a Dialog, the Form is immediately expanded to fill the entire screen, just as if the safeArea was not activated. When the overflow menu or dialog closes, the Form is redisplayed correctly within the safe area. This gives a very jumpy/jittery experience.

I believe I've seen the same issue in other situations, so the problem may be more general than just these two situations.

Is this is a bug or am I not using the safeArea correctly?

1 Answers

This sounds like a bug. Please file an issue here.

Overflow is implemented as a dialog so this seems to be a problem with dialogs. Dialogs paint the background form in a unique way. It isn't the actual Form behind but rather a "fake" painting of the form. This painting process needs to take the safe area into account.

Related