Mobile Device Physical Size
ambassador at fourthworld.com
Sat Oct 21 20:20:00 EDT 2017
Ignore my last post. Garbage. I had overlooked a rather obvious fact
of screen manufacturing: each method will have slight variance in terms
of absolute PPI, resulting in variance not only in physical pixelDensity
differences but in how accurately the OS will bother to account for them
in terms of the approximated logical pixels.
Screens aren't rulers. :)
When you look at devices with sufficiently different screens, you can
see that common elements like the status bar are slightly different from
one device to another. LiveCode objects are no exception. This can be
seen with pretty much all software.
Near the beginning of the year when I was fleshing out layout mechanics
for a couple apps I'm working on, I not only laid my test pool devices
side by side, but also used a small mm ruler to see how consistently
they render controls of a known size.
The variance I saw and measured was about the same as what we see here
between OSes, not small enough to be completely inconsequential but not
large enough to matter for most things.
As long as we don't try to make rulers on screen for measuring physical
objects, we can likely account for reasonable object placement, even
between platforms, well enough.
It would be interesting to learn if Apple devices have
visible/measurable differences in physical size of software objects
between screens made using different manufacturing methods. But it does
seem to be the case with Android.
Fourth World Systems
Richard Gaskin had too much coffee when he wrote:
> Thanks, Brian. With your stats we now have our first anomaly, between
> the two platforms:
> The iOS math checks out in terms of the reported logical metrics
> matching the physical pixels per the pixel density.
> But when we compare the iPhone 5.5" screen with the LG Stylo 5.5"
> screen, LiveCode is telling us that the iPhone screen is both wider and
> taller. Of course given the same diagonal, one screen could be either
> wide or taller than the other, but not both.
> This suggests that Apple's APIs and/or LC's handling of the metrics is
> sufficiently different from how it works with Android that we might run
> into cross-platform issues where physical size matters.
> I wouldn't try to make a measuring ruler on a phone screen, but more
> practical use-cases might involve layouts that require us to put a lot
> of touchable areas into a small space, so figuring out the smallest
> practical size for a clickable element can be important. Or even just
> making sure text is of a sufficiently readable size without making it
> larger than needed on the other platform.
> If we set things up in a way that works well for Android, it seems we
> risk having things too small on iOS.
> Of course both OSes use their own APIs, and neither is required to adopt
> another vendor's method of accounting for things like pixel density.
> But it sure would be nice if we had a method as reliable between
> platforms as it seems to otherwise be within each platform.
> Maybe simplest if LC's pixel density could take into account the
> difference there apparently is between the two OSes. That's the sort of
> thing that makes a cross-platform tool valuable, though I recognize
> there may not be as simple as introducing a correction factor for pixel
> density; given the complexity of rendering/Skia, I suspect it's a bit
> more involved than that.
> I guess the only solution where physical size of controls between
> platforms may be especially important is for us to just remember that
> regardless of any specific physical pixel density, logical pixels will
> be reported to us as about 20% larger on iOS than on Android, and try to
> aim for somewhere in between.
> Richard Gaskin
> Brian Milby wrote:
> > iPhone6SPlus: 5.5" 1242x2208 414x736 414x736 3
> > On Sat, Oct 21, 2017 at 3:54 PM, Richard Gaskin via use-livecode
> > wrote:
> >> Yesterday, in reply to Ralph's post I included these notes about mobile
> >> metrics:
> >> > ...it seems that LC's resolution-independence works very much like
> >> > that of browsers (probably using the same OS APIs under the hood),
> >> > using logical metrics rather than physical.
> >> ...
> >> > I just ran a quick test to see how well that works:
> >> ...
> >> > Diag Physical Web LiveCode PxDensity
> >> > ---- -------- -------- -------- ---------
> >> > LG G Stylo Phone: 5.5" 720x1280 360x592 360x592 2
> >> > Amazon F7 Tablet: 7.0" 600x1024 600x976 600x976 1
> >> This morning I had some testing to do so I charged a couple older
> >> devices and ran my test on each to get:
> >> Samsung S4 Phone: 5.0" 1080x1920 360x640 360x640 3
> >> Samsung S1 Phone: 4.0" 480x800 320x508* 320x534 1.5
More information about the Use-livecode