'programmer/android'에 해당되는 글 63건

  1. 2018.01.02 안드로이드 화면 비율 및 밀도 별 리소스 관리
-------------------------
일반 스마트폰 기준
16:9
1280x720  - hdpi, xhdpi        - sw480dp, sw360dp            drawable-sw480dp-hdpi                    drawable-sw360dp-xhdpi
1920x1080 - xhdpi, xxhdpi    - sw540dp, sw360dp            drawable-sw540dp-xhdpi                    drawable-sw360dp-xxhdpi
2560x1440 - xxhdpi, xxxhdpi    - sw480dp, sw360dp            drawable-sw480dp-xxhdpi                    drawable-sw360dp-xxxhdpi
3840x2160 - xxxhdpi            - sw540dp                    drawable-sw540dp-xxxhdpi


18:9
1440x720  - hdpi, xhdpi        - sw480dp, sw360dp            drawable-sw480dp-long-hdpi                drawable-sw360dp-long-xhdpi
2160x1080 - xhdpi, xxhdpi    - sw540dp, sw360dp            drawable-sw540dp-long-xhdpi                drawable-sw360dp-long-xxhdpi
2880x1440 - xxhdpi, xxxhdpi    - sw480dp, sw360dp            drawable-sw480dp-long-xxhdpi            drawable-sw360dp-long-xxxhdpi
4320x2160 - xxxhdpi            - sw540dp                    drawable-sw540dp-long-xxxhdpi


16:10
1280x800  - hdpi, xhdpi        - sw533dp, sw400dp            drawable-sw533dp-hdpi                    drawable-sw400dp-xhdpi
1920x1200 - xhdpi, xxhdpi    - sw600dp, sw400dp            drawable-sw600dp-xhdpi                    drawable-sw400dp-xxhdpi
2560x1600 - xxhdpi, xxxhdpi    - sw533dp, sw400dp            drawable-sw533dp-xxhdpi                    drawable-sw400dp-xxxhdpi
3840x2400 - xxxhdpi            - sw600dp                    drawable-sw600dp-xxxhdpi


-------------------------
태블릿 기준
태블릿은 일반 스마트폰 대비 한단계 더 낮은 밀도가 있음. 보통 mdpi부터 시작함.



화면 밀도에 따른 리소스 관리


#https://material.io/devices/
#1.0    -    mdpi
#1.33    -    tvdpi
#1.5    -    hdpi
#2.0    -    xhdpi
#2.625    -    xxhdpi     -    Google Pixel, Nexus 5X(1080 x 1920)
#3.0     -    xxhdpi    -    Galaxy Note 4(1440 x 2560)
#3.5    -    xxxhdpi    -    Google Pixel XL, Nexus 6/6P(1440 x 2560)
#4.0    -     xxxhdpi    -    Galaxy S6/S7/S7 Edge(1440 x 2560), S8/S8+(1440 x 2960)

#        1                            1.33                        1.5                            2                         2.625(nexus 5x)                 3                            3.5                            4
#values-sw2160dp-mdpi   =   values-sw1600dp-hdpi    =    values-sw1440dp-hdpi    =    values-sw1080dp-xhdpi     =    values-sw820dp-xxhdpi     =    values-sw720dp-xxhdpi    =    values-sw610dp-xxxhdpi    =    values-sw540dp-xxxhdpi
#values-sw1440dp-mdpi   =   values-sw1080dp-hdpi    =    values-sw960dp-hdpi     =    values-sw720dp-xhdpi      =    values-sw540dp-xxhdpi     =    values-sw480dp-xxhdpi    =    values-sw410dp-xxxhdpi    =    values-sw360dp-xxxhdpi
#values-sw1080dp-mdpi   =   values-sw800dp-hdpi     =    values-sw720dp-hdpi     =    values-sw540dp-xhdpi      =    values-sw410dp-xxhdpi     =    values-sw360dp-xxhdpi    =    values-sw300dp-xxxhdpi    =    values-sw270dp-xxxhdpi
#values-sw720dp-mdpi    =   values-sw540dp-hdpi     =    values-sw480dp-hdpi     =    values-sw360dp-xhdpi      =    values-sw270dp-xxhdpi     =    values-sw240dp-xxhdpi    =    values-sw200dp-xxxhdpi




Posted by ocsoosoo

댓글을 달아 주세요