iWizard
iWizard

Reputation: 7104

How sort images by resolution and density?

On this page in table 3 at the bottom it says there are small, normal, large and extra large screen for each density (ldpi, mdpi, hdpi, xhdpi): http://developer.android.com/guide/practices/screens_support.html#support

For example, if I create mdpi normal screen (320x480) and mdpi large screen (600x1024) should I put all images for both resolutions in mdpi folder? If yes, how should I name those images because those are the same images with different sizes?

Upvotes: 0

Views: 696

Answers (4)

Yash Krishnan
Yash Krishnan

Reputation: 2785

What ever the screen size and resolution, same images apply for similar dpi screens.

Android will automatically resize your images to fit in the screen as you defined regardless of the size and resolution but on basis of dpi.

That means you have to put same images for all same dpi layouts.

Upvotes: 1

Sumit Dhaniya
Sumit Dhaniya

Reputation: 596

If you want to give images specifically for large screen mdpi then you can create a new folder drawable-large-mdpi.

Check out : http://developer.android.com/guide/practices/screens_support.html#qualifiers

Upvotes: 1

g00dy
g00dy

Reputation: 6778

From the same link:

To use a configuration qualifier:

Create a new directory in your project's res/ directory and name it using the format: - is the standard resource name (such as drawable or layout). is a configuration qualifier from table 1, below, specifying the screen configuration for which these resources are to be used (such as hdpi or xlarge). You can use more than one at a time—simply separate each qualifier with a dash. Save the appropriate configuration-specific resources in this new directory. The resource files must be named exactly the same as the default resource files.

Search for "Using configuration qualifiers"

Upvotes: 0

Androiderson
Androiderson

Reputation: 17083

should I put all images for both resolutions in mdpi folder?

Yes. The size of the images should be the same among all screen sizes, they should vary only by density.

In this case you should use drawable-mdpi and treat your layout to better use the extra space you may have in larger screens.

Upvotes: 1

Related Questions