Android images confuse me

I am having a problem with Android images.

I just don’t know what sizes make them and how to make them behave.

I come from iphone development right, so in iphone dev I launched Photoshop, create a canvas size of 640 * 960 and create my own application.

Then I cut the resulting project and exported all the images with the @ 2x extension. Then I would scale it by 0.5 and export for standard display devices.

It's easy to understand ... it's easy to do. If I want the image to occupy half the screen, I would make it 320 pixels wide for high resolutions and 160px for standard resolutions.

Unfortunately, Android does not work like that. I can not understand. There is no “simple conversion." I don’t know how much dipscreen there is in android!

So, I use things like wrap_contentthat that does not help, because then only different image resolutions are displayed on different screens. I have so many problems with extraneous fields in images and all kinds!

How to use images with android?

+5
source share
2 answers

Android -. , -, . iPhone -, .

Android , . @2x, , Android . , .

: http://developer.android.com/guide/practices/screens_support.html

: http://coding.smashingmagazine.com/2011/06/30/designing-for-android/

, , , , -- (, , ).

DIP - , , . , - 100dps, Android, .

hi-res drawable-xhdpi, Android " ", . .

, . , . , , , , , ( 9--), .

, (, ..) Roman Nurik FANTASTIC http://android-ui-utils.googlecode.com/hg/asset-studio/dist/index.html

, , , , , , , ( ), xhdpi, hdpi, mdpi, ldpi. DAYS .

!

+4

: second

Android , iPhone. Android , (), . , wrap_content. , . ? ?

+1

All Articles