Vibhor Bhardwaj
Vibhor Bhardwaj

Reputation: 3101

Android Application Design to support multiple sizes

I am working on Andoid application for mobile only(Not for Tablet). So I am going to tell designer to make PSD for android screens. Generally I tell my designer for making application design on these three sizes and I use dimen to adjust layout for other devices:

  1. 320* 480 (and I put these images into mdpi folder)
  2. 480*800 (I put these images into hdpi folder)
  3. 800*1280 (I put these images into xhdpi folder)

So I want to know what size of PSD should I made from my designer.I am asking about complete screen size.

Upvotes: 0

Views: 83

Answers (2)

duggu
duggu

Reputation: 38439

Different screen pixel ratio :-

ldpi = 1:0.75
mdpi = 1:1
hdpi = 1:1.5
xhdpi = 1:2
xxhdpi = 1:3

so lets take an image with about the size of 100X100:

for mdpi it should be 100X100
for ldpi it should be 75X75
for hdpi it should be 150X150
for xhdpi it should be 200X200
for xxhdpi it should be 300X300

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

xlarge screens are at least 960dp x 720dp
large screens are at least 640dp x 480dp
normal screens are at least 470dp x 320dp
small screens are at least 426dp x 320dp

Upvotes: 0

FanosOs
FanosOs

Reputation: 94

//For Designer

start design PSD file from 100% i.e design from XHDPI then need to downscale it to

75% for HDPI 
and 50% for MDPI

//For Developer

start design for MDPI first then place drawables in appropriate folder

Baseline phone  mdpi    320x480

from that you can increase you drawables as 1.5 for HDPI and 2 for XHDPI

Developer keep in mind while designing layout ref best Practices

1. Use wrap_content, fill_parent, or dp units when specifying
    dimensions in an XML layout file.
 2. Do not use hard coded pixel values in your application code
 3. Do not use AbsoluteLayout (it's deprecated) 
 4. Supply alternative bitmap drawables for different screen densities

Upvotes: 1

Related Questions