Smallscreen | QVGA (240x320) | 480x640 | ||
---|---|---|---|---|
Normalscreen | WQVGA400 (240x400) WQVGA432 (240x432) | HVGA (320x480) | WVGA800 (480x800) WVGA854 (480x854) 600x1024 | 640x960 |
Largescreen | WVGA800** (480x800) WVGA854** (480x854) | WVGA800* (480x800) WVGA854* (480x854) 600x1024 | ||
Extra Largescreen | 1024x600 | WXGA (1280x800)† 1024x768 1280x768 | 1536x1152 1920x1152 1920x1200 | 2048x1536 2560x1536 2560x1600 |
I will elaborate more on how exactly does dp convert to px:
If running on hdpi device 150x150 px image will take up 100*100 dp of screen space.
If running on mdpi device 150x150 px image will take up 150*150 dp of screen space.
If running on xhdpi device 150x150 px image will take up 75*75 dp of screen space.
The other way around: say, you want to add an image to your application and you need it to fill 100*100 dp control, you'll need to create different size images for supported screen sizes:
100*100 px image for mdpi
150*150 px image for hdpi
200*200 px image for xhdpi
Получается
mdpi - коэф 1 - 1280х1280 (мин 800)
hdpi - коэф 1,5 - (500) 900х900
xhdpi - коэф - 2 - 2560х1600
Если нет hdpi то андроид умножит mdpi на 1,5 и покажет.
Комментариев нет :
Отправить комментарий