├── LICENSE └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Tim Poulsen 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Display Classes 2 | ============== 3 | 4 |

Note: This doc is pretty much superseded by Google''s listing of devices, physical size, density, etc. at https://design.google.com/devices/

5 | 6 | My little attempt to catalog device sizes, display classes, and related critical graphics detail for Android and iOS apps. 7 | 8 | 9 | # Android 10 | 11 | Android [defines](http://developer.android.com/guide/practices/screens_support.html#range) 12 | a set of six generalized densities: 13 | 14 | - ldpi (low) ~120dpi 15 | - mdpi (medium) ~160dpi 16 | - hdpi (high) ~240dpi 17 | - xhdpi (extra-high) ~320dpi 18 | - xxhdpi (extra-extra-high) ~480dpi 19 | - xxxhdpi (extra-extra-extra-high) ~640dpi 20 | 21 | ## Android device details 22 | 23 | If you have real devices please check numbers using utils like [ScreenInfo](https://github.com/mportuesisf/ScreenInfo) 24 | 25 | |Brand / Device |Class|PPI|logical Density Factor |platform Height|platform Width| 26 | |-------|---|-----------|----|------------------|----| 27 | |Google Nexus One |hdpi |252| | | | 28 | |Google Nexus S |hdpi |233| | | | 29 | |Google Nexus 6 [\[1\]](#footnote1) |xxxhdpi |560| |1440 |2560 | 30 | |Google Nexus 7 2012 |mdpi|213|1.331250072|1205|800| 31 | |Google Nexus 7 2013 |xhdpi |323|2 |1920 |1104 | 32 | |Google Nexus 4 |xhdpi |318| | | | 33 | |Google Nexus 9 [\[1\]](#footnote1) |xhdpi |288| |2048 |1536 | 34 | |Google Nexus 10 |xhdpi |299| | | | 35 | |HTC Wildfire |mdpi |125| | | | 36 | |HTC Desire |hdpi |252| | | | 37 | |HTC Desire S |hdpi |252| | | | 38 | |HTC Sensation |hdpi |256| | | | 39 | |HTC Desire X |hdpi |233| | | | 40 | |HTC One S |hdpi |256| | | | 41 | |HTC One V |hdpi |252|1.5|800|480| 42 | |HTC Nexus One |hdpi |252| | | | 43 | |HTC One X |Xhdpi |312| | | | 44 | |HTC One |xxhdpi |469| | | | 45 | |HTC One X+ |xhdpi |312| | | | 46 | |HTC One M8 |xxhdpi |441| | | | 47 | |LG Optimus one |mdpi |180| | | | 48 | |LG Optimus S |mdpi |180| | | | 49 | |LG Optimus V |mdpi |180| | | | 50 | |LG F70 |mdpi |199| | | | 51 | |LG G2 mini |hdpi |234| | | | 52 | |LG L90 |hdpi |234| | | | 53 | |LG G Pad |hdpi |273| | | | 54 | |LG Nexus 4 |xhdpi |318| | | | 55 | |LG Nexus 5 |xxhdpi |455| 3|1794 |1080 | 56 | |LG G2 mini |hdpi |234| | | | 57 | |Micromax Canvas 2 A110 |hdpi |196| | | | 58 | |Micromax Canvas Doodle A111 |hdpi |185| | | | 59 | |Micromax Canvas 2 + A110Q |hdpi |196| | | | 60 | |Micromax Canvas HD A116 |xhdpi |294| | | | 61 | |Micromax Canvas 4 A210 |xhdpi |294| | | | 62 | |Micromax Canvas Magnus A117 |xhdpi |294| | | | 63 | |Micromax Canvas Turbo |xxhdpi |441| | | | 64 | |Nokia N1||326 ||2048|1536| 65 | |OnePlus One|xxhdpi|480|3|1920|1080| 66 | |Samsung Galaxy Y |ldpi| |0.75 | | | 67 | |Samsung Galaxy Ace |mdpi |165| | | | 68 | |Samsung Galaxy S |hdpi |233| 1.5|800 |480 | 69 | |Samsung Galaxy S2 |hdpi |240|1.5 |800 |480 | 70 | |Samsung Galaxy S3 |xhdpi |320|2 |1280|720 | 71 | |Samsung Galaxy S4 |xxhdpi |440|3|1920|1080| 72 | |Samsung Galaxy S5 |xxhdpi |432|3| 1920|1080 | 73 | |Samsung Galaxy S6 | |577| | 2560|1440 | 74 | |Samsung Galaxy Nexus |xhdpi |316|2| | | 75 | |Samsung Galaxy Tab 10 |mdpi |149|1 |1280 |800 | 76 | |Samsung Galaxy Tab 2 10 |mdpi |149| | | | 77 | |Samsung Galaxy Tab 4 10.1 |mdpi |149 | |1280 |800 | 78 | |Samsung Galaxy Tab Pro 8.4 | |359 | |2560 |1600 | 79 | |Samsung Galaxy Tab Pro 10.1 | |299 | |2560 |1600 | 80 | |Samsung Galaxy Tab Pro 12.2 | |247 | |2560 |1600 | 81 | |Samsung Galaxy Tab S 8.4 | |359 | |2560 |1600 | 82 | |Samsung Galaxy Tab S 10.5 |xhdpi |288 | |2560 |1600 | 83 | |Samsung Nexus 10 inch tablet |xhdpi |299| | | | 84 | |Samsung Note |xhdpi |285| |1280 |800 | 85 | |Samsung Note 2 |xhdpi |267| |1280 |720 | 86 | |Samsung Note 3 | |388 | |1920 |1080 | 87 | |Samsung Note 4 | |515 | |2560 |1440 | 88 | |Sony Xperia mini |mdpi |192| | | | 89 | |Sony Xperia P |hdpi |275| | | | 90 | |Sony Xperia S |xhdpi |342| | | | 91 | |Sony Xperia J |hdpi |245| | | | 92 | |Sony Xperia Arc |hdpi |233| | | | 93 | |Sony Xperia Pro |hdpi |265| | | | 94 | |Sony Xperia Z |xxhdpi |441| | | | 95 | |Sony Xperia Z2 |xxhdpi |424| | | | 96 | |Motorola Droid |mdpi |265| | | | 97 | |Motorola Defy |hdpi |265| | | | 98 | |Motorola Razr XT910 |hdpi |256| | | | 99 | |Motorola Moto G |xhdpi |326| | | | 100 | |Motorola Moto X |xhdpi |312| | | | 101 | 102 | 103 | [1]: 104 | 105 | 106 | ### Notes: 107 | 108 | * Ti.Platform.displayCaps.dpi represents Androids densityDpi which corresponds to the theoretical resolutions of the various density classes (low, medium, high, etc.). In other words, this value doesn't represent a device's true DPI. For that, look to Ti.Platform.displayCaps.xdpi and ydpi. 109 | * Ti.Platform.displayCaps.platformHeight does not include the height of the ActionBar. 110 | 111 | ### Android app icons 112 | 113 | [Android](http://developer.android.com/design/style/iconography.html) says 114 | 115 | > Launcher icons on a mobile device must be 48x48 dp. 116 | 117 | That means to look good on all devices, you must prepare 5 icons with 1, 1.5x, 2x, 3x, and 4x scales as follows. These are placed in the res/drawable-DPICLASS folders. 118 | 119 | * 48 × 48 pixels (mdpi) 120 | * 72 × 72 pixels (hdpi) 121 | * 96 × 96 pixels (xhdpi) 122 | * 144 × 144 pixels (xxhdpi) 123 | * 192 × 192 pixels (xxxhdpi) 124 | 125 | See and also . 126 | 127 | 128 | # iOS 129 | 130 | iOS doesn't use display classes in the same way as Android. But it does have a similar notion of display independent pixels (called points) and pixel multipliers (that @2x/@3x suffix). 131 | 132 | ## Device details 133 | |Device |Class|PPI|Pixel multiplier |height (points)|width (points)|height (pixels)|width (pixels)| 134 | |-------|---|-----------|----|------------------|----|----|----| 135 | |iPhone 3/3GS |low |163|@1x |480 |320 |480 |320| 136 | |iPhone 4/4s |high |326(1)|@2x |480 |320 |960 |640 | 137 | |iPhone 5/5c/5S |high |326|@2x |568 |320 |1136 |640 | 138 | |iPhone 6 |?? |326|@2x |667 |375 |1334 |750 | 139 | |iPhone 6+(2) |?? |401|@3x |736 |414 |2208 |1242 | 140 | |iPad 1-3 |low | |@1x |1024 |768 |1024 |768 | 141 | |iPad 4, Air |high |264 |@2x |1024 |768 |2048 |1536 | 142 | |iPad Mini |low |163 |@1x |1024 |768 |1024 |768 | 143 | |iPad Mini 2,3|high |326 |@2x |1024 |768 |2048 |1536 | 144 | |iPad Pro(3)| ?? | 264 |@2x |? |? |2732 |2048 | 145 | 146 | 147 | (1) some references say the iPhone 3 - 6 all have a 163 PPI display, while other sources give the data above.
148 | (2) actual display is downsampled to 1080 x 1920, see http://www.paintcodeapp.com/news/iphone-6-screens-demystified for more info
149 | (3) iPad Pro specs from http://www.imore.com/ipad-pro-specs The pixel multiplier is just my guess based on the PPI. 150 | 151 | # Generating more data 152 | 153 | Please help generate data for this table. Fork the repo, determine your device specifics, make your change, and submit a PR. 154 | 155 | ### Appcelerator Titanium 156 | 157 | ```js 158 | // FOR ANDROID drop this into your app/alloy.js file or Resources/app.js 159 | // while it will work for iOS, it doesn't output all the necessary 160 | // info for the above table 161 | Ti.API.info('displayCaps: '+JSON.stringify(Ti.Platform.displayCaps)); 162 | 163 | // or more to get just the info as in the table here: 164 | var densities = { 165 | low: 'ldpi', 166 | medium: 'mdpi', 167 | high: 'hdpi', 168 | xhigh: 'xhdpi', 169 | xxhigh: 'xxhdpi', 170 | xxxhigh: 'xxxhdpi' 171 | }; 172 | Ti.API.info('Density class: ' + densities[Ti.Platform.displayCaps.density]); 173 | if(Ti.Platform.osname == 'iphone') { 174 | Ti.API.info('Density: ' + Ti.Platform.displayCaps.density); 175 | } else { 176 | Ti.API.info('Logical density factor: ' + Ti.Platform.displayCaps.logicalDensityFactor); 177 | } 178 | Ti.API.info('DPI: ' + Ti.Platform.displayCaps.dpi); 179 | Ti.API.info('Height: ' + Ti.Platform.displayCaps.platformHeight); 180 | Ti.API.info('Width: ' + Ti.Platform.displayCaps.platformWidth); 181 | // ready for cutting and pasting into your fork/PR of this repo 182 | Ti.API.info('|model_name|' + 183 | (Ti.Platform.displayCaps.logicalDensityFactor || Ti.Platform.displayCaps.density) + '|' + 184 | densities[Ti.Platform.displayCaps.density] + '|' + 185 | Ti.Platform.displayCaps.dpi + '|' + 186 | Ti.Platform.displayCaps.platformHeight + '|' + 187 | Ti.Platform.displayCaps.platformWidth + '|' 188 | ); 189 | ``` 190 | 191 | # Acknowledgments 192 | 193 | The seed of the idea and the starting point data for this came from http://qualitytestingtips.blogspot.com/2013/08/ldpi-mdpi-hdpi-xhdpi-xxhdpi.html with additional data from the Titans, particularly https://gist.github.com/iotashan/4a6a347547a9c49a3a68 194 | 195 | Many thanks to @paulvi for his help in adding details and clarity to this reference. 196 | 197 | License: MIT 198 | 199 | (it's just facts, so can't be copyrighted or protected really, not that I want to. so have at it, do what you want with it.) 200 | 201 | --------------------------------------------------------------------------------