How to define dimens.xml for every different screen size in android?

后端 未结 9 1824
轮回少年
轮回少年 2020-11-22 00:43

When supporting different screen sizes (densities) in Android often the focus is on creating different layouts for every possible screen. I.E.

9条回答
  •  青春惊慌失措
    2020-11-22 01:01

    You have to create a different values folder for different screens and put dimens.xml file according to densities.

    1) values
    
    2) values-hdpi (320x480 ,480x800)
    
    3) values-large-hdpi (600x1024)
    
    4) values-xlarge (720x1280 ,768x1280 ,800x1280 ,Nexus7 ,Nexus10)
    
    5) values-sw480dp (5.1' WVGA screen)
    
    6) values-xhdpi (Nexus4 , Galaxy Nexus)
    

提交回复
热议问题