Reputation: 49
I'm developing an android application and I have this folders in res
but I need a folder for tablets 7 inch with low resolution - 480x800.If I run this application on my tablet(7 inch 480x800) ,it use the layout folder but it's too small and seems ugly.How can I create a layout for this kind of tablets with low resolution,what is name of the layout folder ?
Upvotes: 3
Views: 2079
Reputation: 5803
If your device is API 13 or higher, you can use the layout-sw<???>dp
qualifier.
For a 7 inch tablet, layout-sw600dp
is the correct qualifier. Your specific tab with resolution 480 x 800 should come under this category with ldpi
density.
Conversion of px to dp: dp = px / (dpi / 160). Here px is 480 and dpi is 120.
So dp = 480/(120/160) == 600dp
As an alternative, you can use layout-large
qualifier. Again here you can use layout-large-ldpi
which specifically defines your tablet.
Upvotes: 3