Difference between "screen size" and "screen density" in Android?
Asked Answered
O

4

30

I have a few questions:

  1. What is the screen size?

  2. What is the screen density?

  3. What is a difference between screen size and screen density?

  4. How I can support different densities and different screen sizes in Android?

I have already read the official documentation, but I was unable to understand the difference between screen size and screen density.

Ot answered 14/3, 2014 at 5:39 Comment(0)
H
6

screen size is about how many pixels you can show on screen.

Density is based on your device real size, if it's small and has a higher resolution, than the density is high cause you show more pixels in less physical space.

1.screen size concerns an absolute number of pixels. (check out wikipedia Image Resolution)

2.Density (aka Pixels per inch - PPI) concerns a relative number of pixels per inch. (check out the wikipedia Pixel Density)
Headwaiter answered 14/3, 2014 at 5:44 Comment(0)
L
3

To put it simple:

  • Screen size is the physical size of the screen (whether in inch or cm)
  • Screen density is the ratio of how many pixels / area of screen size (that's why the unit is dpi, or dots per inch)
Laroy answered 14/3, 2014 at 5:44 Comment(0)
R
2

Simply put, screen size refers to the size of the screen.This varies from device to device.screen density refers to the amount of pixels in a screen.Both are not independent though as screen size affects screen density.

Reisfield answered 14/3, 2014 at 5:46 Comment(0)
R
1

There are different terms and can't be used interchangeably

density = how many pixels appear within a constant area of the display, dots per inch = dpi or ppi(pixels per inch )

size = amount of physical space available for displaying an interface, screen's diagonal, inch

resolution = number of pixels available in the display, scale-independent pixel = sp

Raskind answered 14/3, 2014 at 5:48 Comment(1)
I have use this [play.google.com/store/apps/details?id=lt.andro.screensize ]to measure my screen size this application give me a screen size 720x1280 but you said that screen size unit is "inch"Ot

© 2022 - 2024 — McMap. All rights reserved.