0

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?

iknow
  • 8,358
  • 12
  • 41
  • 68
AndroidDev
  • 4,521
  • 24
  • 78
  • 126

5 Answers5

1

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.

hsafarya
  • 1,043
  • 1
  • 10
  • 21
1

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

0

their are some qualifier for Sizelike small, large,xlarge... you can use them.

For more.

Mohsin Naeem
  • 12,542
  • 3
  • 39
  • 53
0

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

Aviral
  • 1,141
  • 1
  • 10
  • 16
0

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:

enter link description here

Feel free to ask any further doubts if you have.........

Community
  • 1
  • 1
nidhi
  • 763
  • 5
  • 17