In my res folder, I have layout-hdpi, layout-mdpi, layout-xhdpi and layout-ldpi folder. Now my problem is that tablets with resolution 1024 x 600 take layout from layout-mdpi folder. Due to which it is difficult for me to manage layout for other devices also. Because the HVGA device with resolution 320 x 480, also takes layout from layout-mdpi folder. So how can I solve this issue?
-
is your tablet Samsung galaxy with 7 inch screen size ? – rajpara Jul 18 '12 at 14:04
-
for samsung galaxy tab 7 inch screen - http://situee.blogspot.in/2011/11/galaxytab-motorola-xoom-screen-desity.html – rajpara Jul 18 '12 at 14:08
5 Answers
Here is a nice article about that. In short you can create layout-w600dp resource folder where can be your resources for 1024 x 600 tablets.

- 1,043
- 1
- 10
- 21
-
But my app is build using android 2.3.3 and we can use layout-w6000dp above 3.0 – AndroidDev Jul 18 '12 at 14:07
-
In this case you can use layout-large, it supports android versions prior to 3.0 . – hsafarya Jul 18 '12 at 14:10
You can use for exemple
layout-mdpi for HVGA devices and layout-mdpi-sw1024dp for tablets with 1024*600 resolution - sw is for smallestWidth
You can find here, all available options : http://developer.android.com/guide/topics/resources/providing-resources.html

- 69
- 3
their are some qualifier for Size
like small
, large
,xlarge
... you can use them.
For more.

- 12,542
- 3
- 39
- 53
The density is not the only parameter that layouts can be changed on. Size is another one. Please take a look at the table in the below link for all the options you can use. layout-large or layout-xlarge will probably work for you.
http://developer.android.com/guide/practices/screens_support.html

- 1,141
- 1
- 10
- 16
You can try making folder with name layout-sw600dp instead of layout-mdpi for tablet with 7" and 1024*600 res. I am sure it will work for you as it worked for me. And if it is giving you runtime exception while running in emulator then check your api level of target device. Increase it to level 11. You can also refer answer to my question which is similar to yours in the link below:
Feel free to ask any further doubts if you have.........