While Richard's recommendation is appealing, I can't really ask my customers to follow through. ;) I guess what I need to know is:

What does the screenrect return on a notched phone?
How about the rect of the card? Is it different than the screenrect?

Google says the default display, with no flags set, places the app window fully under the notch and blacks out the areas at the sides. How does this affect the card size? Does it get shorter? Or crop? Or scale to the smaller area as though the phone had a different aspect ratio, resulting in pillarboxing?

Android has flags that allow the app to use the areas around the notch, but LC doesn't tell us where those are, or even that a notch exists. I'm not sure what iOS does. I'll have to fire up simulators and emulators I suppose, but I'm hoping to save a lot of testing time if someone has already gone through this.

On 1/29/19 4:40 PM, Ralph DiMola via use-livecode wrote:
I have not yet addressed the Android notch. My LG v20 has an offset to the
right notch but it's reserved for the OS. For the iPhone I have a function
GetCardRect(). It returns a standard issue 4 item rect. I don't use things
like the "the top of this card...". As well as taking in account for the
keyboard it accounts for the iPhone notches. I select "show the status bar"
in the iOS standalone settings and GetCardRect() takes care of the rest. You
can even test in the IDE. I detect if the aspect ratio is an iPhone with a
notch and you can see what will happen on the X. This was an easy
implementation for me because I rolled my own device independence control
placement library long ago using GetCardRect() to deal with the keyboard.
This was long before the iPhoneX.  When the X appeared on the scene I just
added a dozen or so lines of code in GetCardRect() to deal with it. iOS was
very predictable because of Apples strict human interface guidelines. It's
out in the field and working nicely. But the Android is another matter.
There are so many variants to deal with. I just don't know how we can deal
with the Android notch without an LC implementation of an OS API hook or a
new Android manifest "Notch" key to keep the app out of the notch(or both).

Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net


-----Original Message-----
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf
Of J. Landman Gay via use-livecode
Sent: Tuesday, January 29, 2019 4:30 PM
To: LiveCode Mailing List
Cc: J. Landman Gay
Subject: The Notch

I don't have an Android or iPhone with a notch. How do we deal with
positioning for those? Anything I need to know?



--
Jacqueline Landman Gay         |     jac...@hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to