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



_______________________________________________
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