Search code examples
androidandroid-layoutandroid-screen

Doesn't show layout from layout-xlarge folder


I am trying to run my app on my tablet which is 8" device and on my phone which is 5.2" device, I want the layout to be displayed properly on both devices, so I read that I should create 2 different folders: layout-large and layout-xlarge. The 8" device should take the layout from layout-xlarge folder and the 5.2" device should take the layout from layout-large folder. So I put the activity_main.xml on both folders and run it on the 8" device, I don't know why but it doesn't show take the layout from the layout-xlarge folder as it should, instead I see the layout from the layout-large folder.

Tried to figure it out but I don't find much info about that problem.

any help would be appreciated, thank you.


Solution

  • Look at using size quantifiers for tablets instead of the old "small", "normal", "large" property names. They give you more control over which layouts get shown to which device.

    http://developer.android.com/guide/practices/screens_support.html#NewQualifiers