Вопрос

I'm trying to make my app workable and visually better across all different screen sizes, but I have run into some issues. I have a simple image layout : enter image description here

The images are sized 200 x 200 for small and 400 x 400 for the large. In the drawable folders I have made some smaller ones for smaller screens 100x100 , 200x200 and then 50x50 , 100x100. However looking at the list of devices in eclipse, the galaxy nexus 10 and the galaxy nexus both take their images from the xdpi folder. If I make the images work for the nexus its makes the nexus 10 really small and if I make them for the nexus 10 it messes up the layout for other devices. Why doesn't the nexus 10 just use the xxhdpi folder ?

How can I get around this issue ? I want to avoid separate layouts if possible as I've not attempted that yet as i'm still new to android programming.

How can solve this issue ?

Go easy on me as im still quite new. Thanks

edit

Listed as galaxy nexus in eclipse (720 x 1280) and Nexus 10 (2560 x 1600)

as you can see major difference in sizes but use the same xdpi folder

Это было полезно?

Решение

You can declare drawables for different screen widths

drawable-sw720dp/

Другие советы

If you take a look at the android documentation.

It suggests that you create different layouts to support the different sizes. If this become to much work you can restrict which sizes you support in the manifest.

So as i said in the comment above, I would create two folders, one for 720x1280 and one for 2560x1600.

I would then add a layout to each of the ldpi (low), mdpi (medium), hdpi (high), and xhdpi (extra high) if you want to try and support as many as possible.

Sorry I don't know any shortcuts. If i find anything else I'll add to this answer.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top