티스토리 뷰
Density-independent pixel (dp)
A virtual pixel unit that you should use when defining UI layout, to express layout dimensions or position in a density-independent way. The density-independent pixel is equivalent to one physical pixel on a 160 dpi screen, which is the baseline density assumed by the system for a "medium" density screen. At runtime, the system transparently handles any scaling of the dp units, as necessary, based on the actual density of the screen in use. The conversion of dp units to screen pixels is simple: px = dp * (dpi / 160). For example, on a 240 dpi screen, 1 dp equals 1.5 physical pixels. You should always use dp units when defining your application's UI, to ensure proper display of your UI on screens with different densities.
png 이미지 만들 때
이미지 사이즈 계산하기 px=dp*(density/160) dp(dip, density independent pixcel) : 안드로이드에서 여러 화면 크기를 지원하기 위해 만든 단위 160 dpi : 320*480 스크린 기준, 안드로이드 기본 dpi |
[참고]
640*480 VGA(Video Graphic Array) : 기본 모니터 4:3 비율
640*480 VGA(Video Graphic Array) : 기본 모니터 4:3 비율
320*480 HVGA(Half Video Graphic Array) : VGA의 반
320*240 QVGA(Quad Video Graphic Array)
800*480 WVGA(Wide VGA) : 5:3 비율, Galaxy S, HTC Desire, Nexus One, XPERIA
800*480 WVGA(Wide VGA) : 5:3 비율, Galaxy S, HTC Desire, Nexus One, XPERIA
FWVGA(Full Wide VGA) : 16:9, DROID해상도
댓글