Android Notches/Safe Areas

31 views
Skip to first unread message

Javier Anton

unread,
Mar 11, 2021, 4:59:28 AM3/11/21
to codenameone...@googlegroups.com
Hi,

I just finished adjusting and testing for iPhone notches (https://www.codenameone.com/blog/safe-areas.html)

I did a quick search online and found that there are multiple Android phones with notches now too (https://www.cnet.com/pictures/phones-with-notches/10/). Has anyone been able to test a CN1 app on them? Does a standard CN1 toolbar need extra padding as in the case of iOS?

Many thanks

Javier

P5music

unread,
Mar 11, 2021, 5:16:40 AM3/11/21
to CodenameOne Discussions
Many phone producers allow you to download the skin of their devices from their website, you can create an AVD in AndroidStudio with that, then test your app on the emulator about the UI and the notch.
I hope this help you, if I understand what you need.
Regards

Javier Anton

unread,
Mar 11, 2021, 9:39:21 AM3/11/21
to codenameone...@googlegroups.com
Thanks P5, that will be an interesting way to test this

--
You received this message because you are subscribed to the Google Groups "CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codenameone-discu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/codenameone-discussions/93045ee3-b26c-4116-b4bd-0bd417042c5dn%40googlegroups.com.

Shai Almog

unread,
Mar 11, 2021, 11:36:46 PM3/11/21
to CodenameOne Discussions
Android reserves the space on top implicitly unlike iOS so you shouldn't need anything. The safe area API should work for the noches there too. Including information about round corners of the device etc. We probably need more representative skins to cover various edge cases here...

Javier Anton

unread,
Mar 12, 2021, 5:50:40 AM3/12/21
to codenameone...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages