Android support different units of measures:
- dp
- sp
- px
- pt
- mm
- in
They recommend using dp for layout and sp for font size.
Can someone point me to a use case where I should be using one of those: px, pt, mm and in ?
Android support different units of measures:
They recommend using dp for layout and sp for font size.
Can someone point me to a use case where I should be using one of those: px, pt, mm and in ?
Here you have similar question with detailed answers.
Pixels, inches, millimeters and points are units which will be differently displayed on different screens. Screen resolutions can vary between 240x320px and 2560x1600, even with similar screen size and vice versa. Use them only when you absolutely have to (e.g. ruler app).