1 page.title=Icon Design Guidelines 2 parent.title=UI Guidelines 3 parent.link=index.html 4 @jd:body 5 6 <div id="qv-wrapper"> 7 <div id="qv"> 8 9 <h2>Quickview</h2> 10 11 <ul> 12 <li>You can use several types of icons in an Android application.</li> 13 <li>Your icons should follow the general specification in this document.</li> 14 <li>You should create separate icon sets for high-, medium-, and low-density screens.</li> 15 </ul> 16 17 <h2>In this document</h2> 18 19 <ol> 20 <li><a href="#templatespack">Using the Icon Templates Pack</a></li> 21 <li><a href="#icon-sets">Providing Density-Specific Icon Sets</a></li> 22 <li><a href="#design-tips">Tips for Designers</a></li> 23 </ol> 24 25 <h2>Topics</h2> 26 27 <ol> 28 <li><a href="icon_design_launcher.html">Launcher Icons</a></li> 29 <li><a href="icon_design_menu.html">Menu Icons</a></li> 30 <li><a href="icon_design_status_bar.html">Status Bar Icons</a></li> 31 <li><a href="icon_design_tab.html">Tab Icons</a></li> 32 <li><a href="icon_design_dialog.html">Dialog Icons</a></li> 33 <li><a href="icon_design_list.html">List View Icons</a></li> 34 </ol> 35 36 <h2>Downloads</h2> 37 38 <ol> 39 <li><a href="{@docRoot}shareables/icon_templates-v4.0.zip">Android Icon 40 Templates Pack, v4.0 »</a></li> 41 <li><a href="{@docRoot}shareables/icon_templates-v2.3.zip">Android Icon 42 Templates Pack, v2.3 »</a></li> 43 <li><a href="{@docRoot}shareables/icon_templates-v2.0.zip">Android Icon 44 Templates Pack, v2.0 »</a></li> 45 </ol> 46 47 <h2>See also</h2> 48 49 <ol> 50 <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 51 Screens</a></li> 52 </ol> 53 54 55 </div> 56 </div> 57 58 59 <div class="note design"> 60 <p><strong>New Guides for App Designers!</strong></p> 61 <p>Check out the new documents for designers at <strong><a 62 href="{@docRoot}design/index.html">Android Design</a></strong>, including more guidelines 63 for <a href="{@docRoot}design/style/iconography.html">Iconography</a>.</p> 64 </div> 65 66 67 68 <p>Creating a unified look and feel throughout a user interface adds value to 69 your product. Streamlining the graphic style will also make the UI seem more 70 professional to users.</p> 71 72 <p>This document provides information to help you create icons for various parts 73 of your applications user interface that match the general styles used by the 74 Android 2.x framework. Following these guidelines will help you to create a 75 polished and unified experience for the user.</p> 76 77 <p>The following documents discuss detailed guidelines for the common types of 78 icons used throughout Android applications:</p> 79 80 <dl> 81 <dt><strong><a href="icon_design_launcher.html">Launcher Icons</a></strong></dt> 82 <dd>A Launcher icon is a graphic that represents your application on the 83 device's Home screen and in the Launcher window.</dd> 84 <dt><strong><a href="icon_design_menu.html">Menu Icons</a></strong></dt> 85 <dd>Menu icons are graphical elements placed in the options menu shown to 86 users when they press the Menu button.</dd> 87 <dt><strong><a href="icon_design_action_bar.html">Action Bar Icons</a> 88 <span class="new">new!</span></strong></dt> 89 <dd>Action Bar icons are graphical elements representing action items in the 90 <a href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a>.</dd> 91 <dt><strong><a href="icon_design_status_bar.html">Status Bar Icons</a></strong></dt> 92 <dd>Status bar icons are used to represent notifications from your 93 application in the status bar.</dd> 94 <dt><strong><a href="icon_design_tab.html">Tab Icons</a></strong></dt> 95 <dd>Tab icons are graphical elements used to represent individual tabs in a 96 multi-tab interface.</dd> 97 <dt><strong><a href="icon_design_dialog.html">Dialog Icons</a></strong></dt> 98 <dd>Dialog icons are shown in pop-up dialog boxes that prompt the user for 99 interaction.</dd> 100 <dt><strong><a href="icon_design_list.html">List View Icons</a></strong></dt> 101 <dd>List view icons are used with {@link android.widget.ListView} to 102 graphically represent list items. An example is the Settings application.</dd> 103 </dl> 104 105 <p>To get started creating your icons more quickly, you can download 106 the Android Icon Templates Pack.</p> 107 108 109 110 111 112 <h2 id="templatespack">Using the Android Icon Templates Pack</h2> 113 114 <p>The Android Icon Templates Pack is a collection of template designs, 115 textures, and layer styles that make it easier for you to create icons that 116 conform to the guidelines given in this document. We recommend downloading the 117 template pack archive before you start designing your icons.</p> 118 119 <p>The icon templates are provided in the Adobe Photoshop file format (.psd), 120 which preserves the layers and design treatments we used when creating the 121 standard icons for the Android platform. You can load the template files into 122 any compatible image-editing program, although your ability to work directly 123 with the layers and treatments may vary based on the program you are using.</p> 124 125 <p>You can obtain the latest Icon Templates Pack archive using the link below: 126 </p> 127 128 <p style="margin-left:2em"><a 129 href="{@docRoot}shareables/icon_templates-v4.0.zip">Download the Icon Templates 130 Pack for Android 4.0 »</a> 131 132 <p>For previous versions of the Icon Templates Pack, see the <em>Downloads</em> 133 section in the box at the top-right corner of this page.</p> 134 135 136 137 138 139 <h2 id="icon-sets">Providing Density-Specific Icon Sets</h2> 140 141 <p>Android is designed to run on a variety of devices that offer a range of 142 screen sizes and resolutions. When you design the icons for your application, 143 it's important keep in mind that your application may be installed on any of 144 those devices. As described in the <a 145 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 146 Screens</a> document, the Android platform makes it straightforward for you to 147 provide icons in such a way that they will be displayed properly on any device, 148 regardless of the device's screen size or resolution.</p> 149 150 <p>In general, the recommended approach is to create a separate set of icons for 151 each generalized screen density. Then, 152 store them in density-specific resource directories in your application. When 153 your application runs, the Android platform will check the characteristics of 154 the device screen and load icons from the appropriate density-specific 155 resources. For more information about how to store density-specific resources in 156 your application, see <a 157 href="{@docRoot}guide/practices/screens_support.html#qualifiers">Resource 158 directory qualifiers for screen size and density</a>. </p> 159 160 <p>For tips on how to create and manage icon sets for multiple densities, see 161 <a href="#design-tips">Tips for Designers</a>.</p> 162 163 164 165 166 <h2 id="design-tips">Tips for Designers</h2> 167 168 <p>Here are some tips that you might find useful as you develop icons or other 169 drawable assets for your application. The tips assume that you are using 170 Adobe Photoshop or a similar raster and vector image-editing program.</p> 171 172 <h3>Use common naming conventions for icon assets</h3> 173 174 <p>Try to name files so that related assets will group together inside a 175 directory when they are sorted alphabetically. In particular, it helps to use a 176 common prefix for each icon type. For example:</p> 177 178 <table> 179 <tr> 180 <th>Asset Type</th> 181 <th>Prefix</th> 182 <th>Example</th> 183 </tr> 184 <tr> 185 <td>Icons</td> 186 <td><code>ic_</code></td> 187 <td><code>ic_star.png</code></td> 188 </tr> 189 <tr> 190 <td>Launcher icons</td> 191 <td><code>ic_launcher</code></td> 192 <td><code>ic_launcher_calendar.png</code></td> 193 </tr> 194 <tr> 195 <td>Menu icons and Action Bar icons</td> 196 <td><code>ic_menu</code></td> 197 <td><code>ic_menu_archive.png</code></td> 198 </tr> 199 <tr> 200 <td>Status bar icons</td> 201 <td><code>ic_stat_notify</code></td> 202 <td><code>ic_stat_notify_msg.png</code></td> 203 </tr> 204 <tr> 205 <td>Tab icons</td> 206 <td><code>ic_tab</code></td> 207 <td><code>ic_tab_recent.png</code></td> 208 </tr> 209 <tr> 210 <td>Dialog icons</td> 211 <td><code>ic_dialog</code></td> 212 <td><code>ic_dialog_info.png</code></td> 213 </tr> 214 </table> 215 216 <p>Note that you are not required to use a shared prefix of any type — 217 doing so is for your convenience only.</p> 218 219 220 <h3>Set up a working space that organizes files for multiple densities</h3> 221 222 <p>Supporting multiple screen densities means you must create multiple versions 223 of the same icon. To help keep the multiple copies of files safe and easier to 224 find, we recommend creating a directory structure in your working space that 225 organizes asset files per resolution. For example:</p> 226 227 <pre>art/... 228 ldpi/... 229 _pre_production/... 230 <em>working_file</em>.psd 231 <em>finished_asset</em>.png 232 mdpi/... 233 _pre_production/... 234 <em>working_file</em>.psd 235 <em>finished_asset</em>.png 236 hdpi/... 237 _pre_production/... 238 <em>working_file</em>.psd 239 <em>finished_asset</em>.png 240 xhdpi/... 241 _pre_production/... 242 <em>working_file</em>.psd 243 <em>finished_asset</em>.png</pre> 244 245 <p>This structure parallels the density-specific structure in which you will 246 ultimately store the finished assets in your application's resources. Because 247 the structure in your working space is similar to that of the application, you 248 can quickly determine which assets should be copied to each application 249 resources directory. Separating assets by density also helps you detect any 250 variances in filenames across densities, which is important because 251 corresponding assets for different densities must share the same filename.</p> 252 253 <p>For comparison, here's the resources directory structure of a typical 254 application: </p> 255 256 <pre>res/... 257 drawable-ldpi/... 258 <em>finished_asset</em>.png 259 drawable-mdpi/... 260 <em>finished_asset</em>.png 261 drawable-hdpi/... 262 <em>finished_asset</em>.png 263 drawable-xhdpi/... 264 <em>finished_asset</em>.png</pre> 265 266 267 268 <h3>Use vector shapes where possible</h3> 269 270 <p>Many image-editing programs such as Adobe Photoshop allow you to use a 271 combination of vector shapes and raster layers and effects. When possible, 272 use vector shapes so that if the need arises, assets can be scaled up without 273 loss of detail and edge crispness.</p> 274 275 <p>Using vectors also makes it easy to align edges and corners to pixel 276 boundaries at smaller resolutions.</li> 277 278 279 280 <h3>Start with large artboards</h3> 281 282 <p>Because you will need to create assets for different screen densities, 283 it is best to start your icon 284 designs on large artboards with dimensions that are multiples of the target icon 285 sizes. For example, <a 286 href="{@docRoot}guide/practices/ui_guidelines/icon_design_launcher.html">launcher 287 icons</a> are 96, 72, 48, or 36 pixels wide, depending on screen density. If you 288 initially draw launcher icons on an 864x864 artboard, it will be easier and 289 cleaner to tweak the icons when you scale the artboard down to the target 290 sizes for final asset creation.</p> 291 292 293 294 <h3>When scaling, redraw bitmap layers as needed</h3> 295 296 <p>If you scaled an image up from a bitmap layer, rather than from a vector 297 layer, those layers will need to be redrawn manually to appear crisp at higher 298 densities. For example if a 60x60 circle was painted as a bitmap for 299 <code>mdpi</code> it will need to be repainted as a 90x90 circle for 300 <code>hdpi</code>.</p> 301 302 303 304 <h3>When saving image assets, remove unnecessary metadata</h3> 305 306 <p>Although the Android SDK tools will automatically compress PNGs when packaging 307 application resources into the application binary, a good practice is to remove 308 unnecessary headers and metadata from your PNG assets. Tools such as <a 309 href="http://optipng.sourceforge.net/">OptiPNG</a> or <a 310 href="http://pmt.sourceforge.net/pngcrush/">Pngcrush</a> can ensure that this 311 metadata is removed and that your image asset file sizes are optimized.</p> 312 313 314 315 <h3>Make sure that corresponding assets for different densities use the same 316 filenames</h3> 317 318 <p>Corresponding icon asset files for each density <strong>must use the same 319 filename</strong>, but be stored in density-specific resource directories. This 320 allows the system to look up and load the proper resource according to the 321 screen characteristics of the device. For this reason, make sure that the set of 322 assets in each directory is consistent and that the files do not use 323 density-specific suffixes.</p> 324 325 <p>For more information about density-specific resources 326 and how the system uses them to meet the needs of different devices, see <a 327 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 328 Screens</a>.</p> 329 330