Inspectopedia Help

Using mm or in dimensions

Using mm or in dimensions

Avoid using mm (millimeters) or in (inches) as the unit for dimensions.

While it should work in principle, unfortunately many devices do not report the correct true physical density, which means that the dimension calculations won't work correctly. You are better off using dp (and for font sizes, sp).

Issue id: InOrMmUsage

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for Android 2023.3, Qodana for JVM 2023.3


Android, 2022.3.1 Beta 2

Last modified: 13 July 2023