Search code examples
androidlayoutscreenscreen-size

Android layout folders for different screen sizes


I have an app that I need to ensure different devices are pulling from different layout folders. I need a nexus 5 (1920 x 1080) to pull from a different folder than a Note 4 (2560 x 1440).

Currently, no matter what combination of folder names, they both pull from the same folder.

I have tried:

layout-xxhdpi & layout-xxxhdpi 

(they both pull from xxhdpi)

layout-sw320dp & layout-xxhdpi

(they both pull from layout-sw320dp

layout-large & layout-xlarge

(they both pull from layout-large)

What would be the proper layout folder convention for this situation?


Solution

  • So this seems to be the only arrangement that worked for me...

    layout (Nexus 4 & 5)

    layout-sw440dp-port (Note 4, Nexus 6)

    layout-sw720dp-port (Samsung 10" tablet)

    (It I take off the "port" it doesn't work...) ;-)

    Thanx for all the suggestions!