It won't get the real value if the getDeviceSafeArea method is called in the main.lua. Of course, it can be get by calling Timer.delayedCall for several milliseconds. Where is the correct point to get these values?
I am using something similar to @hgy29 where I make some global variables... and I do it in init.lua as I feel that is the best place for that kind of thing to live.
Yes, I think I had similar issues due to orientation changes when app is launched. I think calling it from APPLICATION_RESIZE event was the workaround.
Comments
In main.lua:
He uses
but not the getLogicalBounds.
Likes: MoKaLux