Search code examples
androidandroid-layoutandroid-screen-support

how to support large screen size with API level 17?


I have two layout types layout-v17 and layout-large. I want to know which one will be chosen if I have a device that is large and also greater than API level 17?

Other question is should I design my drawables again for xlarge screen size? I know mdpi, hdpi, xhdpi etc but for example, in mdpi resolution my image view size is 100x100 but in xlarge size I should set it as 400x400.


Solution

  • You can Layout-large will work for large devices. It doesn't matter what is the API level.

    For you second question well If you can your images through different dimen files then you can take that approach else you can check the following folders for different resolution.

    res/values/dimens.xml(default)
        res/values-ldpi/dimens.xml   (240x320 and nearer resolution)
        res/values-mdpi/dimens.xml   (320x480 and nearer resolution)
        res/values-hdpi/dimens.xml   (480x800, 540x960 and nearer resolution)
        res/values-xhdpi/dimens.xml  (720x1280 - Samsung S3, Micromax Canvas HD, etc) 
        res/values-xxhdpi/dimens.xml (1080x1920 - Samsung S4, HTC one, etc)
        res/values-large/dimens.xml  (480x800)
    
        res/values-large-mdpi/dimens.xml (600x1024)
        res/values-sw600dp/dimens.xml  (600x1024)
        res/values-sw720dp/dimens.xml  (800x1280)
        res/values-xlarge-xhdpi/dimens.xml (2560x1600 - Nexus 10")
        res/values-large-xhdpi/dimens.xml  (1200x1920 - Nexus 7"(latest))