FAFI
FAFI

Reputation: 379

Android Screen sizes

I need to know the screen sizes of android devices to support multiple screen sizes application.

Upvotes: 19

Views: 77443

Answers (8)

mlvljr
mlvljr

Reputation: 4161

Here it comes!

  • (240, 320)
  • (240, 400)
  • (320, 480)
  • (360, 640)
  • (480, 640)
  • (480, 800)
  • (480, 854)
  • (540, 960)
  • (600, 800)
  • (600, 1024)
  • (640, 960)
  • (720, 1280)
  • (768, 1280)
  • (768, 1024)
  • (800, 1280)
  • (1080, 1920)
  • (1200, 1920)
  • (1600, 2560)

fresh from http://en.wikipedia.org/wiki/Comparison_of_Android_devices 's html sources parsed with:

import re

s = ""

with open("sizes.html", "r") as src:
    s = src.read()

res = re.findall('([0-9]+)\s*[×xX]\s*([0-9]+)', s)

sizes = set()

for match in res:
    size_int = [int(match[0]), int(match[1])]
    size = (min(size_int), max(size_int))
    if size not in sizes:
        sizes.add(size)

sorted_sizes = list(sizes)
sorted_sizes.sort(key=lambda sz: sz[0])

for sz in sorted_sizes:
    print(sz)

(forgive my python)

Upvotes: 1

enadun
enadun

Reputation: 3307

Different screen sizes are as follows.

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

If you are plan to make an application which support for multiple devices, also you have to crate different layout directories for put different layouts.

res/layout/my_layout.xml             // layout for normal screen size ("default")
res/layout-small/my_layout.xml       // layout for small screen size
res/layout-large/my_layout.xml       // layout for large screen size
res/layout-xlarge/my_layout.xml      // layout for extra large screen size
res/layout-xlarge-land/my_layout.xml // layout for extra large in landscape orientation

If you are plan to add different sizes of images, put them in following folders accordingly. Android OS will automatically take the most suitable image out of them.

res/drawable-ldpi/my_icon.png        // bitmap for low density
res/drawable-mdpi/my_icon.png        // bitmap for medium density
res/drawable-hdpi/my_icon.png        // bitmap for high density
res/drawable-xhdpi/my_icon.png       // bitmap for extra high density

enter image description here

Upvotes: 16

Arthur Rey
Arthur Rey

Reputation: 3058

Here's a little function to know the inch size of your device in case you need it to support multisize screen :

public double getInchSize()
{
    DisplayMetrics metrics = getResources().getDisplayMetrics();
    return Math.hypot(metrics.widthPixels/metrics.xdpi, metrics.heightPixels/metrics.ydpi)
}

Hope it can help

Upvotes: 0

inazaruk
inazaruk

Reputation: 74780

Android supports multitude of screen sizes. There is no list of specific screen sizes. Only approximate ranges. Read more at "Supporting Multiple Screens".

Upvotes: 7

Loktar
Loktar

Reputation: 35309

In terms of supporting different screen sizes I would start by taking a look at the Screen Support Reference, might be able to solve your problem better. To see a list of specific sizes take a look at Table 2

Upvotes: 2

Aleadam
Aleadam

Reputation: 40391

Look at this table: http://developer.android.com/guide/practices/screens_support.html#testing

You can use the pie chart here to have an idea of relative screen size usage: http://developer.android.com/resources/dashboard/screens.html

For a list of screen sizes, resolutions and dpi values, take a look at: http://en.wikipedia.org/wiki/List_of_displays_by_pixel_density

To calculate the real dpi value, check here: http://en.wikipedia.org/wiki/Pixel_density#Calculation_of_monitor_PPI

Upvotes: 18

Ted Hopp
Ted Hopp

Reputation: 234795

I don't think there's a comprehensive list of all existing screen sizes, since new devices are coming out all the time. Have you seen the page on Screen Sizes and Densities and the documentation on Supporting Multiple Screens?

Upvotes: 17

Related Questions