I have two android device with same resolution
Device1 -> resolution 480x800 diagonal screen size -> 6 inches
Device2 -> resolution 768x1024 diagonal screen size -> 6.0 inches
How to find device diagonal screen size? Please help me!
I have two android device with same resolution
Device1 -> resolution 480x800 diagonal screen size -> 6 inches
Device2 -> resolution 768x1024 diagonal screen size -> 6.0 inches
How to find device diagonal screen size? Please help me!
Why do you need it? With Corona SDK you define a content grid of your point and Corona handles the scaling for you.
But if you look at the system.getInfo() API docs, there are ways to get various bits of info including the width and height. Once you have that it’s a simple Pythagorean theorem to calculate the diagonal:
local diagonal = math.sqrt( width * width + height * height )
Rob
Why do you need it? With Corona SDK you define a content grid of your point and Corona handles the scaling for you.
But if you look at the system.getInfo() API docs, there are ways to get various bits of info including the width and height. Once you have that it’s a simple Pythagorean theorem to calculate the diagonal:
local diagonal = math.sqrt( width * width + height * height )
Rob