I am using the timer as described, and I also trried to set ShowStatusBar and TitleVisible to False or True, but changing this parameter does not change the result.
My phone is a Xiaomi Mi11 Ultra with a screen resoultion of 1440x3200. The screen size I get is 831x411 (with ShowStatusBar and TitleVisible enabled or disabled). According to the post, size is not in pixel but in dp (that's OK, but the odcumention says it is in pixel)
However, even if I try to convert dp in pixel: using 515 dpi for my phone, I get 831 x (515 / 160) = 2680 instead of 3440, and 411 x (515 / 160) = 1322 instead of 1440.
Difference could be because of the "usable" screen size, but it should change when hide/show title and status bar ?
Here is my test program (using Responsive Size): ScreenSizeTest.aia (7.0 KB)
and the screenshots with and without title / staus bar:
Thanks a lot Anke. This extension provides the results I was expecting
At least App Inventor help for screen parameters should be updated, so it says result is in dp (good explanation here ), and would be good to point to this DisplayMetrics extension
From my point of view, you are better off working with the default reported sizes. Otherwise you may need to change the sizings using the extension for every component you use.
You then can correctly size images for most devices if you work on that basis, instead of fiddling about with dp/pixels. viz: a 4:3 aspect ratio image, viewed with phone in portrait mode, needs to be no larger than 411w x 308h. (probably easier to resize to 400x300 on your device )
831x411 is fairly standard for most phones, my Pixel 4a is 753 x 392, roughly 2:1 aspect.
Sorry, I do not understand your screenshot. Are these values for different phones? How do you get these different results?
My worry is that the 560 dpi returned by the extension is different from the screen datasheet which is 515.
I really feel stupid, but how do you change Display Size? Screen Width and Height are hardware phone parameters, and using Responsive screen sizing, my understanding is that app will adapt to the hardware resolution, but will be fixed for a given phone
Seems I do not understand something