Reputation: 3221
I have
layout
layout-large
layout-xlarge
folders in my res
folder.
But despite being a 7 inch tablet the layouts are picked from layout
folder instead of layout-large.
and device runs on android 4.0
Am i missing something?? Thanks.
Upvotes: 0
Views: 4136
Reputation: 1874
Check the correct device resolution and follow the charts offered by Android: http://developer.android.com/guide/practices/screens_support.html
Configuration examples:
To help you target some of your designs for different types of devices, here are some numbers for typical screen widths:
in your case you need to create a "layout-600dp" folder inside your "res" folder.
Upvotes: 2
Reputation: 1618
Because the DP of the device is 160dp/inch which falls under the category of mdpi devices
Upvotes: 0
Reputation: 128428
Check Configuration examples in Supporting Multiple screens document.
res/layout/main_activity.xml # For handsets (smaller than 600dp available width)
res/layout-sw600dp/main_activity.xml # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/main_activity.xml # For 10” tablets (720dp wide and bigger)
Upvotes: 3