I’m developing an app for Android. I test my app in various phones and works great. I have my folders mdpi, hdpi..., xxxhdpi layouts and drawables too. Now I’m facing the tablet problem. I test my app in Google Nexus 10 and the app not looks good. The tablet has a density of 2.0, so when I resize the component all is very small. I dony know if I have to add some other size folder layout or something like that. How can I do to develop an app to work in tablets too? Something is missing and I can’t find it.
Asked
Active
Viewed 61 times
0
-
maybe this is a help: http://developer.android.com/guide/practices/screens_support.html – Opiatefuchs Mar 04 '16 at 14:32
-
Possible duplicate of [How to prepare layout,drawable folders for 7",10" android tablets for both landscape and portrait?](http://stackoverflow.com/questions/17647507/how-to-prepare-layout-drawable-folders-for-7-10-android-tablets-for-both-lands) – Gueorgui Obregon Mar 04 '16 at 14:34
1 Answers
0
You can add different layout resources depending on screen size, use these qualifiers:
res/layout-sw600dp/ # For 7” tablets (600dp wide and bigger)
res/layout-sw720dp/ # For 10” tablets (720dp wide and bigger)
res/layout-sw600dp-port/ # For 7” tablets in portrait (600dp wide or bigger)
res/layout-sw720dp-port/ # For 10” tablets in portrait (720dp wide or bigger)
Refer to this question: How to prepare layout,drawable folders for 7",10" android tablets for both landscape and portrait?

Community
- 1
- 1

Niels Masdorp
- 2,534
- 2
- 18
- 31
-
So, i have to create two more folder, for tablets of 7'' and 10''? Are tablets with more inches? – user3240604 Mar 04 '16 at 14:40
-
Also in the drawable folders too? Is there a way to use a drawable folder like xxhdpi so the images have more quality? – user3240604 Mar 04 '16 at 14:41
-
You'll probably want to add 4 new folders (each size in portrait and landscape). – Niels Masdorp Mar 04 '16 at 14:42
-
You can still keep your images in whatever drawable folder they're in. – Niels Masdorp Mar 04 '16 at 14:43
-
-
-
The problem is when i desgin for example to tablet 10'', images are too small, how can i do to take images more big? – user3240604 Mar 04 '16 at 14:52
-
Use higher quality images in the appropriate folder. For example a Nexus 10 tablet has a xhdpi screen. – Niels Masdorp Mar 04 '16 at 14:55
-
Yes i have, the problem is that when im designing in xml, all images are small, i have to resize it in code? – user3240604 Mar 04 '16 at 14:58
-
What is small? The size in layout or the quality? I don't really know what you mean. – Niels Masdorp Mar 04 '16 at 15:05
-
The size in layout. When i move to the graphical layout everything is small. – user3240604 Mar 04 '16 at 15:06
-
-
I have another problem, i ask for the dentisty, If density is 2.0 (xhdpi) and the screen size are not 1280 x 720 it calculates the new sizes of the components, That happens with my tablet because it has 2560 x 1600 – user3240604 Mar 04 '16 at 15:20
-
-