Measure the length, width, diameter and height of the phone

Hello friends, I want to measure the size, length, width, height and diameter of the whole phone, not just the phone screen, please help me.

Use the DisplayPhysicalSize function from this amazing extension.

2 Likes

I would rather suggest you to use DisplayHeight and DisplayWidth, because so far, I know that they are measured in pixels. I'm still finding out what unit DisplayPhysicalSize shows.

3 Likes

Diameter? Maybe radius of corners (can only get that measuring by hand or from manufacturer's technical drawing).

You may be able to get the exact sizes from the manufactures and build a database.

1 Like

The actual unit of measurement in android is pixel but we are following DP for measurement, so value which you got from block is in DP unit, you need to convert them into actual pixel by using given formula....

DP = pixel/device_density

1 Like

Int to float and float to int conversation may lose some value form actual value so I suggest you to build extension to get actual values.

1 Like

I'm pretty sure "diameter" is their terminology for the length between two non-adjacent edges. You can use the Pythogorean/Pythagoras' Theorem to solve this.

What do you mean? Show your blocks please.

P.S.: it would be better to post in the extension topic because this topic is solved already :wink:

1 Like

Android 9 / P(ie):

Android 12 / S

2 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.