zmalltalker / sketch-android-assets

Generate Android assets in Sketch
GNU General Public License v3.0
356 stars 55 forks source link

Which setting for .5x of nexus 5 resolution? #26

Closed bradwrage closed 9 years ago

bradwrage commented 9 years ago

Having a hard time understanding which base setting to choose if I want to design at half the size of a 1080x1920 size?

zmalltalker commented 9 years ago

Setting the base resolution basically tells the plugin the relationship between one pixel in your Sketch document and one dip on an Android device. The Nexus 5 is an xxhdpi device, which means that one dip equals 3 pixels on the device.

If you select xxhdpi as your base resolution, this means that the xxhdpi version of your slices will have the same pixel dimensions as your Sketch document, while the lower density versions will be scaled down. While if you select mdpi as your base resolution, the mdpi version will have the same pixel dimensions as your Sketch document, while the other densities will be scaled up.

Which base resolution you choose doesn't matter much from a techical perspective as long as you're not using imported bitmaps into your Sketch document (in which case you should probably use a high density as your base to avoid bitmaps to be pixelated). Some users find that using mdpi makes the math easier, since in mdpi 1 dip equals 1 pixel. Other users prefer using the same base resolution as the device they do their testing on, since that lets you compare screenshots to your Sketch document. YMMW.