1 page.title=Icon Design Guidelines, Android 2.0 2 @jd:body 3 4 <div id="qv-wrapper"> 5 <div id="qv"> 6 7 <h2>Icon design quickview</h2> 8 9 <ul> 10 <li>You can use several types of icons in an Android application.</li> 11 <li>Your icons should follow the general specification in this document.</li> 12 <li>You should create separate icon sets for high-, medium-, and low-density screens.</li> 13 </ul> 14 15 <h2>In this document</h2> 16 17 <ol> 18 <li><a href="#launcherstructure">Launcher icon</a></li> 19 <li><a href="#menustructure">Menu icon</a></li> 20 <li><a href="#statusbarstructure">Status bar icon</a></li> 21 <li><a href="#tabstructure">Tab icon</a></li> 22 <li><a href="#dialogstructure">Dialog icon</a></li> 23 <li><a href="#listviewstructure">List view icon</a></li> 24 25 <li style="margin-top:3px;"><a href="#design_tips">Tips for Designers</a></li> 26 <li><a href="#templatespack">Using the Icon Templates Pack</a></li> 27 28 <li><a href="#iconappendix">Icon appendix</a> 29 <ol> 30 <li><a href="#launcherapx">Standard Launcher icons</a></li> 31 <li><a href="#menuapx">Standard Menu icons</a></li> 32 <li><a href="#statusbarapx">Standard Status bar icons</a></li> 33 </ol> 34 </li> 35 36 </ol> 37 38 <h2>See also</h2> 39 40 <ol> 41 <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 42 Screens</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>Older versions</h2> 48 49 <ol> 50 <li style="margin-top:4px;"><a 51 href="{@docRoot}guide/practices/ui_guidelines/icon_design_1.html">Icon Design 52 Guidelines, Android 1.0</a></li> 53 <li><a href="{@docRoot}shareables/icon_templates-v1.0.zip">Android Icon 54 Templates Pack, v1.0 »</a></li> 55 </ol> 56 57 58 </div> 59 </div> 60 61 <p>Creating a unified look and feel throughout a user interface adds value to 62 your product. Streamlining the graphic style will also make the UI seem more 63 professional to users.</p> 64 65 <p>This document provides information to help you create icons for various parts 66 of your applications user interface that match the general styles used by the 67 Android 2.x framework. Following these guidelines will help you to create a 68 polished and unified experience for the user.</p> 69 70 <p>To get started creating your icons more quickly, you can download 71 the Android Icon Templates Pack. For more information, see 72 <a href="#templatespack">Using the Android Icon Template Pack</a>.</p> 73 74 75 <h2 id="icon-sets">Providing Density-Specific Icon Sets</h2> 76 77 <p>Android is designed to run on a variety of devices that offer a range of 78 screen sizes and resolutions. When you design the icons for your application, 79 it's important keep in mind that your application may be installed on any of 80 those devices. As described in the <a 81 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 82 Screens</a> document, the Android platform makes it straightforward for you to 83 provide icons in such a way that they will be displayed properly on any device, 84 regardless of the device's screen size or resolution.</p> 85 86 <p>In general, the recommended approach is to create a separate set of icons for 87 each of the three generalized screen densities listed in Table 1, below, then 88 store them in density-specific resource directories in your application. When 89 your application runs, the Android platform will check the characteristics of 90 the device screen and load icons from the appropriate density-specific 91 resources. For more information about how to store density-specific resources in 92 your application, see <a 93 href="{@docRoot}guide/practices/screens_support.html#qualifiers">Resource 94 directory qualifiers for screen size and density</a>. </p> 95 96 <p>The baseline screen density for Android devices is medium 97 (<code>mdpi</code>). For this reason, a recommended approach to creating icon 98 sets for multiple screen densities is to:</p> 99 100 <ol> 101 <li>Design the icons for the baseline density first (see Table 1 for the actual 102 pixel dimensions at which to design the icons). </li> 103 <li>Place the icons in the application's default drawable resources, then run 104 the application on an Android Virtual Device (AVD) or an HVGA device such as the 105 T-Mobile G1. </li> 106 <li>Test and adjust your baseline icons as needed.</li> 107 <li>When you are satisfied with the icons you've developed at the baseline 108 density, create scaled copies for the other densities. 109 110 <ul> 111 <li>Scale the baseline icons up 150% to create the high-density assets.</li> 112 <li>Scale the baseline icons down 75% to create the low-density assets.</li> 113 </ul></li> 114 115 <li>Place the icons in density-specific resource directories in your 116 application. For example: 117 <ul> 118 <li>Medium-density assets go in a <code>res/drawable-mdpi/</code> 119 directory (or in the default <code>res/drawable/</code> directory),</li> 120 <li>High-density assets go in a <code>res/drawable-hdpi/</code> directory, 121 and</li> 122 <li>Low-density assets go in a <code>res/drawable-ldpi/</code> 123 directory.</li> 124 </ul></li> 125 <li>Test and adjust the high- and low-density icons if needed</li> 126 </ol> 127 128 <p>For tips on how to create and manage icon sets for multiple densities, see 129 <a href="#design_tips">Tips for Designers</a>.</p> 130 131 <p class="caption" id="screens-table"><strong>Table 1.</strong> Summary of 132 finished icon dimensions for each of the three generalized screen densities, by 133 icon type.</p> 134 135 <table style="margin-top:2em;"> 136 <tbody> 137 <tr> 138 <th>Icon Type</th><th colspan="3">Standard Asset Sizes (in Pixels), for 139 Generalized Screen Densities</th></tr> 140 <tr> 141 <td></td> 142 <th style="background-color:#f3f3f3;font-weight:normal"> 143 <nobr>Low density screen <em>(ldpi)</em></nobr> 144 </th> 145 <th style="background-color:#f3f3f3;font-weight:normal"> 146 <nobr>Medium density screen <em>(mdpi)</em></nobr> 147 </th> 148 <th style="background-color:#f3f3f3;font-weight:normal"> 149 <nobr>High density screen <em>(hdpi)</em><nobr> 150 </th> 151 </tr> 152 153 <tr> 154 <th style="background-color:#f3f3f3;font-weight:normal"> 155 Launcher 156 </th> 157 <td style="font-size:.9em;"> 158 36 x 36 px 159 </td> 160 161 <td style="font-size:.9em;"> 162 48 x 48 px 163 </td> 164 <td style="font-size:.9em;"> 165 72 x 72 px 166 </td> 167 </tr> 168 169 <tr> 170 <th style="background-color:#f3f3f3;font-weight:normal"> 171 Menu 172 </th> 173 <td style="font-size:.9em;"> 174 36 x 36 px 175 </td> 176 177 <td style="font-size:.9em;"> 178 48 x 48 px 179 </td> 180 <td style="font-size:.9em;"> 181 72 x 72 px 182 </td> 183 </tr> 184 185 <tr> 186 <th style="background-color:#f3f3f3;font-weight:normal"> 187 Status Bar 188 </th> 189 <td style="font-size:.9em;"> 190 24 x 24 px 191 </td> 192 193 <td style="font-size:.9em;"> 194 32 x 32 px 195 </td> 196 <td style="font-size:.9em;"> 197 48 x 48 px 198 </td> 199 </tr> 200 <tr> 201 <th style="background-color:#f3f3f3;font-weight:normal"> 202 Tab 203 </th> 204 <td style="font-size:.9em;"> 205 24 x 24 px 206 </td> 207 208 <td style="font-size:.9em;"> 209 32 x 32 px 210 </td> 211 <td style="font-size:.9em;"> 212 48 x 48 px 213 </td> 214 </tr> 215 <tr> 216 <th style="background-color:#f3f3f3;font-weight:normal"> 217 Dialog 218 </th> 219 <td style="font-size:.9em;"> 220 24 x 24 px 221 </td> 222 223 <td style="font-size:.9em;"> 224 32 x 32 px 225 </td> 226 <td style="font-size:.9em;"> 227 48 x 48 px 228 </td> 229 </tr> 230 <tr> 231 <th style="background-color:#f3f3f3;font-weight:normal"> 232 List View 233 </th> 234 <td style="font-size:.9em;"> 235 24 x 24 px 236 </td> 237 238 <td style="font-size:.9em;"> 239 32 x 32 px 240 </td> 241 <td style="font-size:.9em;"> 242 48 x 48 px 243 </td> 244 </tr> 245 </tbody> 246 </table> 247 248 <h2 id="launcherstructure">Launcher Icon</h2> 249 250 <p>A Launcher icon is a graphic that represents your application on the devices 251 Home screen and in the Launcher window. </p> 252 253 <p>The user opens the Launcher by touching the icon at the bottom of the Home 254 screen. The Launcher opens and exposes the icons for all of the installed 255 applications, which are arranged in a grid. The user selects an application and 256 opens it by touching the Launcher icon or by means of any hardware navigation 257 controls available, such as a trackball or d-pad. </p> 258 259 <p>The user can also drag an icon out of the Launcher window and onto the Home 260 screen itself, for more convenient access to the application. In this case, the 261 system displays your application's Launcher icon against the Home screen 262 wallpaper, rendering it at the same dimensions as it is rendered inside the 263 Launcher.</p> 264 265 <p>The system manages the scaling of all Launcher icons so that they rendered at 266 a uniform height and width. The actual pixel dimensions of the rendered Launcher 267 icons on any given device varies, based on the size and pixel-density 268 characteristics of the device's screen. To ensure the best possible rendering 269 for your icons, supply versions of the icons that are designed for low, medium, 270 and high density screens. For information, see <a 271 href="#icon_sets">Providing Density-Specific Icon Sets</a>, above, or <a 272 href="#design_tips">Tips for Designers</a>, below.</p> 273 274 <h3 id="style">Style</h3> 275 276 <p>The launcher icons that you create should follow the general style principles 277 below. The guidelines aren't meant to restrict what you can do with your icons, 278 but rather they are meant to emphasize the common approaches that your icons can 279 share with others on the device. Figure 1, at right, provides examples. </p> 280 281 <div class="figure" style="padding:3em"> 282 <img src="{@docRoot}images/icon_design/IconGraphic_Icons_i.png" 283 width="340"> 284 <p class="caption" style="margin:0;padding:0;margin-left:36px;"> 285 <strong>Figure 1.</strong> Illustration of Launcher icon style.</p> 286 </div> 287 288 <p>Clean and contemporary:</p> 289 290 <ul> 291 <li>Launcher icons should be current and sometimes quirky, but they should not 292 appear aged or ragged. You should avoid overused symbolic metaphors whenever 293 possible.</li> 294 </ul> 295 296 <p>Simple and iconic:</p> 297 <ul> 298 <li> Android Launcher icons are caricatural in nature; your icons should be 299 highly simplified and exaggerated, so that they are appropriate for use at small 300 sizes. Your icons should not be overly complicated. </li> 301 <li>Try featuring a single part of an application as a symbolic 302 representation of the whole (for example, the Music icon features a speaker). 303 </li> 304 <li>Consider using natural outlines and shapes, both geometric and organic, 305 with a realistic (but never photorealistic) rendering. </li> 306 <li>Your icons <em>should not</em> present a cropped view of a larger 307 image.</li> 308 </ul> 309 310 <p>Tactile and textured:</p> 311 <ul> 312 <li>Icons should feature non-glossy, textured material. See 313 <a href="#materials-colors">Materials and colors</a>, below, for more 314 information.</li> 315 </ul> 316 317 <p>Forward-facing and top-lit:</p> 318 <ul> 319 <li><em>New for Android 2.0 and later platforms</em>: Android Launcher 320 icons should be forward-facing, with very little perspective, and they 321 should be top-lit.</li> 322 </ul> 323 324 Additionally, note all icons will have separate text labels, so rather than 325 working to include embedded text in the design of of your icons, focus your 326 efforts on the icon's visual distinctiveness and memorability instead.</p> 327 328 <p>To look at more examples of the Launcher icons used by built-in Android 329 applications, see <a href="#launcherapx">Standard Launcher Icons</a> in the 330 Icons Appendix of this document. </p> 331 332 333 334 <h3 id="dodonts">Do's and Don'ts</h3> 335 336 <p>Below are some "do and don't" examples to consider when creating icons for 337 your application. </p> 338 339 340 <table> 341 <tr> 342 <td style="border:0;width:50%;"> 343 344 <h4>Android Launcher icons are...</h4> 345 346 <ul> 347 <li>Modern, minimal, matte, tactile, and textured</li> 348 <li>Forward-facing and top-lit, whole, limited in color 349 palette</li> 350 </ul> 351 </td> 352 <td style="border:0;width:50%;"> 353 354 <h4>Android Launcher icons are not...</h4> 355 356 <ul> 357 <li>Antique, over-complicated, glossy, flat vector</li> 358 <li>Rotated, Cropped, Over-Saturated</li> 359 </ul> 360 </td> 361 </tr> 362 <tr> 363 </table> 364 365 <div style="margin-left:2em"> 366 <img src="{@docRoot}images/icon_design/IconGraphic_DosDonts.png" alt="Side-by-side examples 367 of good/bad icon design." /> 368 <p class="caption" style="margin-top:.5em;"> 369 <strong>Figure 2.</strong> Side-by-side examples of "do's and don'ts" for 370 Android launcher icons. </p> 371 </div> 372 373 <h3 id="materials-colors">Materials and colors</h3> 374 375 <p>Launcher icons should make use of tactile, top-lit, textured materials. Even 376 if your icon is just a simple shape, you should try to render in a way that 377 makes it appear to be sculpted from some real-world material.</p> 378 379 <p>The Launcher icons for the platform's default applications use the set of 380 materials shown in Figure 3, below. Your icons can use these materials or you 381 can create new materials.</p> 382 383 <p>Android launcher icons usually consist of a smaller shape within a 384 larger base shape and combine one neutral and one primary color. Icons may 385 use a combination of neutral colors but should maintain a fairly high level of 386 contrast. Icons should not use more than one primary color per icon, if 387 possible.</p> 388 389 <p>Launcher icons should use a limited color palette that includes a range 390 of neutral and primary colors. The icons should not be over-saturated.</p> 391 392 <p>The recommended color palette to use for Launcher icons is shown in Figure 4. 393 You can use elements of the palette for both the base color and the highlight 394 color. You can use the colors of the palette in conjunction with a 395 white-to-black vertical linear gradient overlay. This creates the impression 396 that the icon is lit from above and keeps the color less saturated.</p> 397 398 399 400 <div style="margin:2em"> 401 <img src="{@docRoot}images/icon_design/IconGraphic_Materials.png" width="450" style="padding-top:2px;"> 402 <p class="caption" style="margin-top:.5em;"> 403 <strong>Figure 3.</strong> Example materials that you can use to create 404 your icons.</p> 405 </div> 406 407 <div style="margin:2em"> 408 <img src="{@docRoot}images/icon_design/IconGraphic_AccentColor.png" width="450"> 409 <p class="caption" xstyle="margin-top:.5em;"> 410 <strong>Figure 4.</strong> Examples of materials combined with base 411 and highlight colors from the recommended palette.</p> 412 </div> 413 414 415 <p>When you combine the materials above with a color highlight from the 416 recommended pallete, you can create materials combinations such as those shown 417 in Figure 5. To get you started, the <a href="#templatespack">icons pack</a> 418 includes a Photoshop template file (<code>Launcher-icon-template.psd</code>) 419 that provides all of the default materials, colors, and gradients. </p> 420 421 <div style="margin:2em"> 422 <img src="{@docRoot}images/icon_design/IconGraphic_Colors.png" width="450" style="padding-top:2px;"> 423 <p class="caption" style="margin-top:.5em;"> 424 <strong>Figure 5.</strong> Recommended color palette for icons.</p> 425 </div> 426 427 428 <h3 id="size">Size and positioning</h3> 429 430 <p>Launcher icons should use a variety of shapes and forms and those must be 431 scaled and positioned to create consistent visual weight.</p> 432 433 <p>Launcher icons should use a variety of shapes and forms and those must be 434 scaled and positioned inside the asset to create consistent visual weight with 435 other </p> 436 437 <p>Figure 6 illustrates various ways of positioning the icon inside the asset. 438 As detailed in the table below, you should size the icons <em>smaller than the 439 actual bounds of the asset</em>, to create a consistent visual weight and to 440 allow for the inclusion of shadows. If your icon is square or nearly square, it 441 should be scaled even smaller.</p> 442 443 444 <ul> 445 <li>The bounding box for the full asset is shown in red.</li> 446 <li>The recommended bounding box for the actual icon itself is shown in blue. 447 The icon box is sized smaller than the full asset box so that there is space to 448 include shadows and special icon treatments. </li> 449 <li>The recommended bounding box for an icon that is square is shown in orange. 450 The box for square icons is smaller than that for other icons to establish a 451 consistent visual weight across the two types.</li> 452 </ul> 453 454 <table style="margin:2.5em 0 1em 0;"> 455 <tr> 456 457 <td style="border:0;padding-left:72;"> 458 <ol class="nolist"> 459 <li>Icon dimensions for high-density (<code>hdpi</code>) screens:</li> 460 <ol class="nolist"> 461 <li>Full Asset: 72 x 72 px</li> 462 <li>Icon: 60 x 60 px</li> 463 <li>Square Icon: 56 x 56 px</li> 464 </ol> 465 </li> 466 </ol> 467 </td> 468 <td style="border:0;"> 469 <img src="{@docRoot}images/icon_design/IconGraphic_OpticalSize_l.png" 470 style="padding:0;margin:0;" width="450"> 471 </td> 472 </tr> 473 <tr> 474 <td style="border:0;"> 475 <ol class="nolist"> 476 <li>Icon Dimensions for medium-density (<code>mdpi</code>) screens:</li> 477 <ol class="nolist"> 478 <li>Full Asset: 48 x 48 px</li> 479 <li>Icon: 40 x 40 px</li> 480 <li>Square Icon: 38 x 38 px</li> 481 </ol> 482 </li> 483 </ol> 484 </td> 485 486 <td style="border:0;padding-left:72;"> 487 <img src="{@docRoot}images/icon_design/IconGraphic_OpticalSize_s.png" 488 style="padding:0;margin:0;" width="450"> 489 </td> 490 </tr> 491 <tr> 492 <td style="border:0;"> 493 <ol class="nolist"> 494 <li>Icon Dimensions for low-density (<code>ldpi</code>) screens:</li> 495 <ol class="nolist"> 496 <li>Full Asset: 36 x 36 px</li> 497 <li>Icon: 30 x 30 px</li> 498 <li>Square Icon: 28 x 28 px</li> 499 </ol> 500 </li> 501 </ol> 502 </td> 503 504 <td style="border:0;padding-left:72;"> 505 <img src="{@docRoot}images/icon_design/IconGraphic_OpticalSize_ldpi.png" 506 style="padding:0;margin:0;" width="450"> 507 508 <p class="caption" style="margin:0;padding:0;margin-top:1.5em;"><strong>Figure 509 6.</strong> Icon sizing and positioning inside the bounds of the 510 icon asset.</p> 511 </td> 512 </tr> 513 514 </table> 515 516 517 518 <h3>Using the Launcher Icon Template</h3> 519 520 <p>Included in the Android Icon Templates Pack 2.0 is a template containing 521 palettes for default icon materials and colors. The template is provided in .psd 522 format for Adobe Photoshop or similar raster image editor. </p> 523 524 <p>To get started, first <a 525 href="{@docRoot}shareables/icon_templates-v2.0.zip">download the Android Icon 526 Templates Pack 2.0 »</a>. </p> 527 528 <p>Once you've downloaded the pack, unzip it and open the file 529 <code>Launcher-icon-template.psd</code> in Adobe Photoshop or similar raster 530 image editing program. Notice the palettes for materials and colors. You can 531 use as the template as a starting point for creating your Launcher icons. </p> 532 533 <p>After you create your icon, you can add a shadow effect according to the 534 specification below, as appropriate for the size of image you are creating. </p> 535 536 537 <table style="margin:2.5em 0 1em 0;"> 538 <tr> 539 540 <td style="border:0;padding-left:72;"> 541 <img src="{@docRoot}images/icon_design/IconGraphic_Shadow_WVGA.png" 542 style="padding:0;margin:0;" width="450"> 543 </td> 544 <td style="border:0;"> 545 <p style="padding-top:.5em;">Shadow for WVGA (high density) sreens:</p> 546 <ol class="nolist"> 547 <li>Effect: Drop Shadow</li> 548 <li>Color: #000000</li> 549 <li>Blend Mode: Multiply</li> 550 <li>Opacity: 75%</li> 551 <li>Angle: 90</li> 552 <li>Distance: 2px</li> 553 <li>Spread: 0% </li> 554 <li>Size: 5px </li> 555 </ol> 556 </li> 557 </ol> 558 </td> 559 </tr> 560 <tr> 561 <td style="border:0;padding-left:72;"> 562 <img src="{@docRoot}images/icon_design/IconGraphic_Shadow_HVGA.png" 563 style="padding:0;margin:0;" width="450"> 564 </td> 565 566 <td style="border:0;"> 567 <p style="padding-top:.5em;">Shadow for HVGA (medium density) sreens:</p> 568 <ol class="nolist"> 569 <li>Effect: Drop Shadow</li> 570 <li>Color: #000000</li> 571 <li>Blend Mode: Multiply</li> 572 <li>Opacity: 75%</li> 573 <li>Angle: 90</li> 574 <li>Distance: 1px</li> 575 <li>Spread: 0% </li> 576 <li>Size: 3px </li> 577 </ol> 578 </li> 579 </ol> 580 </td> 581 </tr> 582 </table> 583 584 <p>When the shadow is added and the icon is complete, export it as a PNG file 585 with transparency enabled, ensuring that you size the icon at 72 x 72px for 586 high-density screens and 48 x 48px for medium density screens. For more 587 information about why you should provide different Launcher assets for high-, 588 medium, and low-density screens, see <a 589 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 590 Screens</a>.</p> 591 592 593 594 <h2 id="menustructure">Menu icon</h2> 595 596 <p>Menu icons are graphical elements placed in the pop-up menu shown to users 597 when they press the Menu button. They are drawn in a flat-front perspective. 598 Elements in a menu icon must not be visualized in 3D or perspective.</p> 599 600 <p>As described in <a href="#icon-sets">Providing Density-Specific Icon 601 Sets</a>, above, you should create separate icon sets for low-, normal, and 602 high-density screens. This ensures that your icons will display properly across 603 the range of devices on which your application can be installed. See <a 604 href="#screens-table">Table 1</a> for a listing of the recommended finished icon 605 sizes for each density. Also, see <a href="#design-tips">Tips for Designers</a> 606 for suggestions on how to work with multiple sets of icons.</p> 607 608 <h4>Structure</h4> 609 610 <ul> 611 <li>In order to maintain consistency, all menu icons must use the same 612 primary palette and the same effects. For more information, see the 613 menu icon <a href="#menupalette">color palette</a>. </li> 614 615 <li>Menu icons should include rounded corners, but only when logically 616 appropriate. For example, in Figure 7 the logical place for rounded corners is 617 the roof and not the rest of the building.</span></li> 618 619 <li>All dimensions specified on this page are based on a 48x48 pixel artboard 620 size with a 6 pixel safeframe.</li> 621 622 <li>The menu icon effect (the outer glow) described in <a 623 href="#menulight">Light, effects, and shadows</a> can overlap the 6px safeframe, 624 but only when necessary. The base shape must always stay inside the 625 safeframe.</li> 626 627 <li><strong>Final art must be exported as a transparent PNG file.</strong></li> 628 629 <li>Templates for creating menu icons in Adobe Photoshop are available in the 630 Icon Templates Pack.</li> 631 </ul> 632 633 <table class="image-caption"> 634 <tr> 635 <td class="image-caption-i" style="padding-right:0"> 636 <img src="{@docRoot}images/icon_design/menu_structure.png" alt="A view of menu 637 icon structure." /> 638 </td> 639 <td class="image-caption-c"> 640 <div class="caption grad-rule-top"> 641 <p><strong>Figure 7. </strong>Safeframe and corner-rounding for menu 642 icons. Icon size is 48x48.</p> 643 </div> 644 </td> 645 </tr> 646 </table> 647 648 649 <h4 id="menulight">Light, effects, and shadows</h4> 650 651 <p>Menu icons are flat and pictured face on. A slight deboss and some other 652 effects, which are shown below, are used to create depth.</p> 653 654 <table class="image-caption"> 655 <tr> 656 <td class="image-caption-i"> 657 <img src="{@docRoot}images/icon_design/menu_light.png" alt="A view of light, effects, and shadows for menu icons."/> 658 </td> 659 <td class="image-caption-c"> 660 <div class="caption grad-rule-top"> 661 <p><strong>Figure 8. </strong>Light, effects, and shadows for menu icons.</p> 662 <div class="image-caption-nested"> 663 <table style="margin-top:0;"> 664 <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>Use fill gradient from primary color palette</td></tr> 665 <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 20 % opacity<br>angle 90 | distance 2px<br>size 2px</td></tr> 666 <tr><td><em>3.</em></td><td>Outer glow:</td><td>white | 55% opacity <br>spread 10% | size 3px</td></tr> 667 <tr><td><em>5.</em></td><td>Inner bevel:</td><td>depth 1% | direction down size 0px<br>angle 90 | altitude 10<br>highlight white 70% opacity<br>shadow black 25% opacity</td></tr> 668 </table> 669 </div> 670 </div> 671 </td> 672 </tr> 673 </table> 674 675 <table style="margin:0px;padding:0px;"> 676 <tr> 677 <td style="border:0;width:350px;"> 678 679 <h4 id="menupalette">Color palette</h4> 680 681 <table style="margin:0px;padding:0px;"> 682 <tr> 683 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_white.png" alt="Color palette, white" style="margin:.5em 0 0 0;" /></td> 684 <td class="image-caption-c" style="padding-top:.5em;">White<br>r 255 | g 255 | b 255<br>Used for outer glow and bevel highlight.</td> 685 </tr> 686 687 <tr> 688 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_gradient_medium.png" alt="Color palette, medium gradient" style="margin:.5em 0 0 0;" /></td> 689 <td class="image-caption-c" style="padding-top:.5em;">Fill gradient<br><em>1: </em>r 163 | g 163 | b 163<br><em>2: </em>r 120 | g 120 | b 120<br>Used as color fill.</td> 690 </tr> 691 692 <tr> 693 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_black.png" alt="Color palette, black" style="margin:.5em 0 0 0;" /></td> 694 <td class="image-caption-c" style="padding-top:.5em;">Black<br>r 0 | g 0 | b 0<br>Used for inner shadow and bevel shadow.</td> 695 </tr> 696 697 </table> 698 699 </td> 700 701 <td style="border:0;width:350px"> 702 703 <h4 id="menusteps">Step by step</h4> 704 705 <ol> 706 <li>Create the basic shapes using a tool like Adobe Illustrator.</li> 707 <li>Import the shape into a tool like Adobe Photoshop and scale to fit an image 708 of 48x48 px on a transparent background. Mind the safeframe.</li> 709 <li>Add the effects seen as described in Figure 8.</li> 710 <li>Export the icon at 48x48 as a PNG file with transparency enabled.</li> 711 </ol> 712 713 </td> 714 </tr> 715 </table> 716 717 <h4 id="dodonts_menu">"Do's and don'ts"</h4> 718 719 <p>Below are some "do and don't" examples to consider when creating menu icons for 720 your application. </p> 721 722 723 <img src="{@docRoot}images/icon_design/do_dont_menuicons.png" style="padding:0;margin:0;padding-right:30%" width="400"> 724 725 726 <h2 id="statusbarstructure">Status bar icon</h2> 727 728 <p>Status bar icons are used to represent notifications from your application in 729 the status bar. Graphically, they are very similar to menu icons, but are 730 smaller and higher in contrast.</p> 731 732 <p>As described in <a href="#icon-sets">Providing Density-Specific Icon 733 Sets</a>, above, you should create separate icon sets for low-, normal, and 734 high-density screens. This ensures that your icons will display properly across 735 the range of devices on which your application can be installed. See <a 736 href="#screens-table">Table 1</a> for a listing of the recommended finished icon 737 sizes for each density. Also, see <a href="#design-tips">Tips for Designers</a> 738 for suggestions on how to work with multiple sets of icons.</p> 739 740 <h4>Structure</h4> 741 742 <ul> 743 <li>Rounded corners must always be applied to the base shape and to the details 744 of a status bar icon shown Figure 9.</li> 745 746 <li>All dimensions specified are based on a 25x25 pixel artboard size with a 2 747 pixel safeframe.</li> 748 749 <li>Status bar icons can overlap the safeframe to the left and right when 750 necessary, but must not overlap the safeframe at the top and bottom.</li> 751 752 <li><strong>Final art must be exported as a transparent PNG file.</strong></li> 753 754 <li>Templates for creating status bar icons using Adobe Photoshop are available 755 in the Icon Templates Pack.</li> 756 </ul> 757 758 <table class="image-caption"> 759 <tr> 760 <td class="image-caption-i" style="padding-right:0"> 761 <img src="{@docRoot}images/icon_design/statusbar_structure.png" alt="A view of 762 status bar icon structure." /> 763 </td> 764 <td class="image-caption-c"> 765 <div class="caption grad-rule-top"> 766 <p><strong>Figure 9. </strong>Safeframe and corner-rounding for status bar 767 icons. Icon size is 25x25.</p> 768 </div> 769 </td> 770 </tr> 771 </table> 772 773 774 <h4 id="statusbarlight">Light, effects, and shadows</h4> 775 776 <p>Status bar icons are slightly debossed, high in contrast, and pictured 777 face-on to enhance clarity at small sizes.</p> 778 779 <table class="image-caption"> 780 <tr> 781 <td class="image-caption-i"> 782 <img src="{@docRoot}images/icon_design/statusbar_light.png" alt="A view of 783 light, effects, and shadows for status bar icons."/> 784 </td> 785 <td class="image-caption-c"> 786 <div class="caption grad-rule-top"> 787 <p><strong>Figure 10. </strong>Light, effects, and shadows for status bar icons.</p> 788 <div class="image-caption-nested"> 789 <table style="margin-top:0;"> 790 <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>Use fill gradient from primary color palette</td></tr> 791 <tr><td><em>2.</em></td><td>Inner bevel:</td><td>depth 100% | direction down<br>size 0px | angle 90 |<br>altitude 30<br>highlight white 75% opacity<br>shadow black 75% opacity</td></tr> 792 <tr><td><em>3.</em></td><td>Detail:</td><td>white</td></tr> 793 <tr><td><em>4.</em></td><td>Disabled detail:</td><td>grey gradient from palette<br>+ inner bevel: smooth | depth 1% | direction down | size 0px | angle 117 | <br>altitude 42 | highlight white 70% | no shadow</td></tr> 794 </table> 795 </div> 796 </div> 797 </td> 798 </tr> 799 </table> 800 801 <table style="margin:0px;padding:0px;"> 802 <tr> 803 <td style="border:0;width:350px;"> 804 805 <h4 id="menupalette">Color palette</h4> 806 807 <p>Only status bar icons related to the phone function use full color; all other status bar icons should remain monochromatic.</p> 808 809 <table style="margin:0px;padding:0px;"> 810 <tr> 811 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_white.png" alt="Color palette, white" style="margin:.5em 0 0 0;" /></td> 812 <td class="image-caption-c" style="padding-top:.5em;">White<br>r 255 | g 255 | b 255<br>Used for details within the icons and bevel highlight.</td> 813 </tr> 814 815 <tr> 816 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_grey.png" alt="Color palette, grey gradient" style="margin:.5em 0 0 0;" /></td> 817 <td class="image-caption-c" style="padding-top:.5em;">Grey gradient<br><em>1: </em>r 169 | g 169 | b 169<br><em>2: </em>r 126 | g 126 | b 126<br>Used for disabled details within the icon.</td> 818 </tr> 819 820 <tr> 821 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_fill.png" alt="Color palette, fill gradient" style="margin:.5em 0 0 0;" /></td> 822 <td class="image-caption-c" style="padding-top:.5em;">Fill gradient<br><em>1: </em>1 r 105 | g 105 | b 105<br><em>2: </em>r 10 | g 10 | b 10<br>Used as color fill.</td> 823 </tr> 824 825 <tr> 826 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_black.png" alt="Color palette, black" style="margin:.5em 0 0 0;" /></td> 827 <td class="image-caption-c" style="padding-top:.5em;">Black<br>r 0 | g 0 | b 0<br>Used for bevel shadow.</td> 828 </tr> 829 830 </table> 831 832 </td> 833 834 <td style="border:0;width:350px"> 835 836 <h4 id="menusteps">Step by step</h4> 837 838 <ol> 839 <li>In a tool like Adobe Photoshop, create the base shape within a 25x25 px 840 image on a transparent background. Mind the safeframe, and keep the upper and 841 lower 2 pixels free.</li> 842 <li>Add rounded corners as specified in Figure 9.</li> 843 <li>Add light, effects, and shadows as specified in Figure 10.</li> 844 <li>Export the icon at 25x25 as a PNG file with transparency enabled.</li> 845 </ol> 846 847 </td> 848 </tr> 849 </table> 850 851 852 <h4 id="dodonts_status">"Do's and don'ts"</h4> 853 854 <p>Below are some "do and don't" examples to consider when creating status bar icons for 855 your application. </p> 856 857 858 <img src="{@docRoot}images/icon_design/do_dont_statusicons.png" style="padding:0;margin:0;padding-right:30%" width="400"> 859 860 861 862 <h2 id="tabstructure">Tab icon</h2> 863 864 <p>Tab icons are graphical elements used to represent individual tabs in a 865 multi-tab interface. Each tab icon has two states: unselected and selected.</p> 866 867 <p>As described in <a href="#icon-sets">Providing Density-Specific Icon 868 Sets</a>, above, you should create separate icon sets for low-, normal, and 869 high-density screens. This ensures that your icons will display properly across 870 the range of devices on which your application can be installed. See <a 871 href="#screens-table">Table 1</a> for a listing of the recommended finished icon 872 sizes for each density. Also, see <a href="#design-tips">Tips for Designers</a> 873 for suggestions on how to work with multiple sets of icons.</p> 874 875 <h4>Structure</h4> 876 877 <ul> 878 <li>Unselected tab icons have the same fill gradient and effects as menu icons, 879 but with no outer glow.</li> 880 881 <li>Selected tab icons look just like unselected tab icons, but with a fainter 882 inner shadow, and have the same front part gradient as dialog icons.</li> 883 884 <li>Tab icons have a 1 px safeframe which should only be overlapped for the edge 885 of the anti-alias of a round shape.</li> 886 887 <li>All dimensions specified on this page are based on a 32x32 px artboard size. 888 Keep 1 px of padding around the bounding box inside the Photoshop template.</li> 889 890 <li><strong>Final art must be exported as a 32x32 px transparent PNG 891 file.</strong></li> 892 893 <li>Templates for creating tab icons in Adobe Photoshop are available in the 894 Icon Templates Pack.</li> 895 </ul> 896 897 <table class="image-caption"> 898 <tr> 899 <td class="image-caption-i" style="padding-right:0"> 900 <img src="{@docRoot}images/icon_design/tab_icon_unselected.png" alt="A view of 901 unselected tab icon structure." /> 902 </td> 903 <td class="image-caption-c"> 904 <div class="caption grad-rule-top"> 905 <p><strong>Figure 11. </strong>Safeframe and fill gradient for unselected tab 906 icons. Icon size is 32x32.</p> 907 </div> 908 </td> 909 </tr> 910 <tr> 911 <td class="image-caption-i" style="padding-right:0"> 912 <img src="{@docRoot}images/icon_design/tab_icon_selected.png" alt="A view of 913 selected tab icon structure." /> 914 </td> 915 <td class="image-caption-c"> 916 <div class="caption grad-rule-top"> 917 <p><strong>Figure 12. </strong>Safeframe and fill gradient for tab icons in 918 selected state. Icon size is 32x32.</p> 919 </div> 920 </td> 921 </tr> 922 </table> 923 924 <h3 id="unselectedtabdetails">Unselected tab icon</h3> 925 926 <h4 id="unselectedtablight">Light, effects, and shadows</h4> 927 928 <p>Unselected tab icons look just like the selected tab icons, but with a 929 fainter inner shadow, and the same front part gradient as the dialog icons.</p> 930 931 <table class="image-caption"> 932 <tr> 933 <td class="image-caption-i"> 934 <img src="{@docRoot}images/icon_design/tab_unselected_light.png" alt="A view 935 of light, effects, and shadows for unselected tab icons."/> 936 </td> 937 <td class="image-caption-c"> 938 <div class="caption grad-rule-top"> 939 <p><strong>Figure 13. </strong>Light, effects, and shadows for unselected 940 tab icons.</p> 941 <div class="image-caption-nested"> 942 <table style="margin-top:0;"> 943 <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>gradient overlay | angle 90<br>bottom color: r 223 | g 223 | b 223<br>top color: r 249 | g 249 | b 249<br>bottom color location: 0%<br>top color location: 75%</td></tr> 944 <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 10 % opacity | angle 90 distance 2px | size 2px</td></tr> 945 <tr><td><em>3.</em></td><td>Inner bevel:</td><td>depth 1% | direction down | size 0px | angle 90 | altitude 10<br>highlight white 70% opacity<br>shadow black 25% opacity</td></tr> 946 </table> 947 </div> 948 </div> 949 </td> 950 </tr> 951 </table> 952 953 954 <table style="margin:0px;padding:0px;"> 955 <tr> 956 <td style="border:0;width:350px;"> 957 958 <h4 id="menusteps">Step by step</h4> 959 960 <ol> 961 <li>Create the basic shapes using a tool like Adobe Illustrator.</li> 962 <li>Import the shape to a tool like Adobe Photoshop and scale to fit an image of 963 32x32 px on a transparent background.</li> 964 <li>Add the effects seen in Figure 13 for the unselected state filter.</li> 965 <li>Export the icon at 32x32 as a PNG file with transparency enabled.</li> 966 </ol> 967 968 </td> 969 </tr> 970 </table> 971 972 <h3 id="selectedtabdetails">Selected tab icon</h3> 973 974 <p>The selected tab icons have the same fill gradient and effects as the menu 975 icon, but with no outer glow.</p> 976 977 <table class="image-caption"> 978 <tr> 979 <td class="image-caption-i"> 980 <img src="{@docRoot}images/icon_design/tab_selected_light.png" alt="A view of 981 light, effects, and shadows for selected tab icons."/> 982 </td> 983 <td class="image-caption-c"> 984 <div class="caption grad-rule-top"> 985 <p><strong>Figure 14. </strong>Light, effects, and shadows for selected tab 986 icons.</p> 987 <div class="image-caption-nested"> 988 <table style="margin-top:0;"> 989 <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>Use fill gradient from color palette.</td></tr> 990 <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 20% opacity | <br>angle 90 | distance 2px | <br>size 2px</td></tr> 991 <tr><td><em>3.</em></td><td>Inner bevel:</td><td>depth 1% | direction down | size 0px | angle 90 | <br>altitude 10<br>highlight white 70% opacity<br>shadow black 25% opacity</td></tr> 992 </table> 993 </div> 994 </div> 995 </td> 996 </tr> 997 </table> 998 999 <table style="margin:0px;padding:0px;"> 1000 <tr> 1001 <td style="border:0;width:350px;"> 1002 1003 <h4 id="menupalette">Color palette</h4> 1004 1005 <table style="margin:0px;padding:0px;"> 1006 <tr> 1007 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_gradient_medium.png" alt="Color palette, fill gradient" style="margin:.5em 0 0 0;" /></td> 1008 <td class="image-caption-c" style="padding-top:.5em;">Fill gradient<br><em>1: </em>r 163 | g 163 | b 163<br><em>2: </em>r 120 | g 120 | b 120<br>Used as color fill on unselected tab icons.</td> 1009 </tr> 1010 1011 </table> 1012 1013 </td> 1014 1015 <td style="border:0;width:350px"> 1016 1017 <h4 id="menusteps">Step by step</h4> 1018 1019 <ol> 1020 <li>Create the basic shape using a tool like Adobe Illustrator.</li> 1021 <li>Import the shape into a tool like Adobe Photoshop and scale to fit a 32x32 1022 px artboard with a transparent background. </li> 1023 <li>Add the effects seen in Figure 14 for the selected state filter.</li> 1024 <li>Export the icon at 32x32 as a PNG file with transparency enabled.</li> 1025 </ol> 1026 1027 </td> 1028 </tr> 1029 </table> 1030 1031 1032 <h2 id="dialogstructure">Dialog icon</h2> 1033 1034 <p>Dialog icons are shown in pop-up dialog boxes that prompt the user for 1035 interaction. They use a light gradient and inner 1036 shadow in order to stand out against a dark background.</p> 1037 1038 <p>As described in <a href="#icon-sets">Providing Density-Specific Icon 1039 Sets</a>, above, you should create separate icon sets for low-, normal, and 1040 high-density screens. This ensures that your icons will display properly across 1041 the range of devices on which your application can be installed. See <a 1042 href="#screens-table">Table 1</a> for a listing of the recommended finished icon 1043 sizes for each density. Also, see <a href="#design-tips">Tips for Designers</a> 1044 for suggestions on how to work with multiple sets of icons.</p> 1045 <h4>Structure</h4> 1046 1047 <ul> 1048 <li>Dialog icons have a 1 pixel safeframe. The base shape must fit within the 1049 safeframe, but the anti-alias of a round shape can overlap the safeframe. <span 1050 class="body-copy"></li> 1051 1052 <li>All dimensions specified on this page are based on a 32x32 pixel artboard size 1053 in Adobe Photoshop. Keep 1 pixel of padding around the bounding box inside the 1054 Photoshop template.</li> 1055 1056 <li><strong>Final art must be exported as a transparent PNG file.</strong></li> 1057 1058 <li>Templates for creating dialog icons in Adobe Photoshop are available in the 1059 Icon Templates Pack.</li> 1060 </ul> 1061 1062 <table class="image-caption"> 1063 <tr> 1064 <td class="image-caption-i" style="padding-right:0"> 1065 <img src="{@docRoot}images/icon_design/dialog_icon.png" alt="A view of dialog 1066 icon structure." /> 1067 </td> 1068 <td class="image-caption-c"> 1069 <div class="caption grad-rule-top"> 1070 <p><strong>Figure 15. </strong>Safeframe and fill gradient for dialog icons. 1071 Icon size is 32x32.</p> 1072 </div> 1073 </td> 1074 </tr> 1075 </table> 1076 1077 1078 <h4 id="dialoglight">Light, effects, and shadows</h4> 1079 1080 <p>Dialog icons are flat and pictured face-on. In order to stand out against a 1081 dark background, they are built up using a light gradient and inner shadow.</p> 1082 1083 <table class="image-caption"> 1084 <tr> 1085 <td class="image-caption-i"> 1086 <img src="{@docRoot}images/icon_design/dialog_light.png" alt="A view of light, 1087 effects, and shadows for dialog icons."/> 1088 </td> 1089 <td class="image-caption-c"> 1090 <div class="caption grad-rule-top"> 1091 <p><strong>Figure 16. </strong>Light, effects, and shadows for dialog 1092 icons.</p> 1093 <div class="image-caption-nested"> 1094 <table style="margin-top:0;"> 1095 <tr><td style="padding-right:1em"><em>1.</em></td><td>Front part:</td><td>gradient overlay | angle 90<br>bottom: r 223 | g 223 | b 223<br>top: r 249 | g 249 | b 249<br>bottom color location: 0%<br>top color location: 75%</td></tr> 1096 <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 25% opacity | <br>angle -90 | distance 1px | size 0px</td></tr> 1097 </table> 1098 </div> 1099 </div> 1100 </td> 1101 </tr> 1102 </table> 1103 1104 1105 <table style="margin:0px;padding:0px;"> 1106 <tr> 1107 <td style="border:0;width:350px;"> 1108 1109 <h4 id="menusteps">Step by step</h4> 1110 1111 <ol> 1112 <li>Create the basic shapes using a tool like Adobe Illustrator.</li> 1113 <li>Import the shape into a tool like Adobe Photoshop and scale to fit an image 1114 of 32x32 px on a transparent background. </li> 1115 <li>Add the effects seen in Figure 16 for the proper filter.</li> 1116 <li>Export the icon at 32x32 as a PNG file with transparency enabled.</li> 1117 </ol> 1118 1119 </td> 1120 </tr> 1121 </table> 1122 1123 1124 <h2 id="listviewstructure">List view icon</h2> 1125 1126 <p>List view icons look a lot like dialog icons, but they use an inner shadow 1127 effect where the light source is above the object. They are also designed to be 1128 used only in a {@link android.widget.ListView}. Examples include the Android 1129 Market application home screen and the driving directions screen in the Maps 1130 application.</p> 1131 1132 <p>As described in <a href="#icon-sets">Providing Density-Specific Icon 1133 Sets</a>, above, you should create separate icon sets for low-, normal, and 1134 high-density screens. This ensures that your icons will display properly across 1135 the range of devices on which your application can be installed. See <a 1136 href="#screens-table">Table 1</a> for a listing of the recommended finished icon 1137 sizes for each density. Also, see <a href="#design-tips">Tips for Designers</a> 1138 for suggestions on how to work with multiple sets of icons.</p> 1139 1140 <h4>Structure</h4> 1141 1142 <ul> 1143 <li>A list view icon normally has a 1 px safeframe, but it is OK to use the 1144 safeframe area for the edge of the anti-alias of a round shape. </li> 1145 1146 <li>All dimensions specified are based on a 32x32 pixel artboard size in 1147 Photoshop. Keep 1 pixel of padding around the bounding box inside the template. 1148 </li> 1149 1150 <li><strong>Final art must be exported as a transparent PNG file.</strong></li> 1151 1152 <li>Templates for creating list view icons in Adobe Photoshop are available in 1153 the Icon Templates Pack. </li> 1154 </ul> 1155 1156 <table class="image-caption"> 1157 <tr> 1158 <td class="image-caption-i" style="padding-right:0"> 1159 <img src="{@docRoot}images/icon_design/listview_icon.png" alt="A view of list 1160 view icon structure." /> 1161 </td> 1162 <td class="image-caption-c"> 1163 <div class="caption grad-rule-top"> 1164 <p><strong>Figure 17. </strong>Safeframe and fill gradient for list view 1165 icons. Icon size is 32x32.</p> 1166 </div> 1167 </td> 1168 </tr> 1169 </table> 1170 1171 <h4 id="listviewlight">Light, effects, and shadows</h4> 1172 1173 <p>List view icons are flat and pictured face-on with an inner shadow. Built up 1174 by a light gradient and inner shadow, they stand out well on a dark 1175 background.</p> 1176 1177 <table class="image-caption"> 1178 <tr> 1179 <td class="image-caption-i"> 1180 <img src="{@docRoot}images/icon_design/listview_icon_details.png" alt="A view 1181 of light, effects, and shadows for list view icons."/> 1182 </td> 1183 <td class="image-caption-c"> 1184 <div class="caption grad-rule-top"> 1185 <p><strong>Figure 18. </strong>Light, effects, and shadows for list view 1186 icons.</p> 1187 <div class="image-caption-nested"> 1188 <table style="margin-top:0;"> 1189 <tr><td style="padding-right:1em"><em>1.</em></td><td>Inner shadow:</td><td>black | 57 % opacity | angle 120 | blend mode normal | distance 1px | size 1px <td></tr> 1190 <tr><td><em>2.</em></td><td>Background:</td><td>black | standard system color <br>These icons are displayed in list views only.</td></tr> 1191 <tr><td colspan="2">Note: The list view icon sits on 32x32 px artboard in Photoshop, without a safeframe.</td></tr> 1192 </table> 1193 </div> 1194 </div> 1195 </td> 1196 </tr> 1197 </table> 1198 1199 <table style="margin:0px;padding:0px;"> 1200 <tr> 1201 <td style="border:0;width:350px;"> 1202 1203 <h4 id="menusteps">Step by step</h4> 1204 1205 <ol> 1206 <li>Add the effects seen in Figure 18 for the proper filter.</li> 1207 <li>Export the icon at 32x32 as a PNG file with transparency enabled.</li> 1208 <li>Create the basic shapes using a tool like Adobe Illustrator.</li> 1209 <li>Import the shape into a tool like Adobe Photoshop and scale to fit an image 1210 of 32x32 px on a transparent background. </li> 1211 </ol> 1212 1213 </td> 1214 </tr> 1215 </table> 1216 1217 <h2 id="design_tips">Tips for Designers</h2> 1218 1219 <p>Here are some tips that you might find useful as you develop icons or other 1220 drawable assets for your application. The tips assume that you are using 1221 Photoshop or similar raster image-editing program.</p> 1222 1223 <h4>Use common naming conventions for icon assets</h4> 1224 1225 <p>Try to name files so that related assets will group together inside a 1226 directory when they are sorted alphabetically. In particular, it helps to use a 1227 common prefix for each icon type. For example:</p> 1228 1229 <table> 1230 <tr> 1231 <th>Asset Type</th> 1232 <th>Prefix</th> 1233 <th>Example</th> 1234 </tr> 1235 <tr> 1236 <td>Icons</td> 1237 <td><code>ic_</code></td> 1238 <td><code>ic_star.png</code></td> 1239 </tr> 1240 <tr> 1241 <td>Launcher icons</td> 1242 <td><code>ic_launcher</code></td> 1243 <td><code>ic_launcher_calendar.png</code></td> 1244 </tr> 1245 <tr> 1246 <td>Menu icons</td> 1247 <td><code>ic_menu</code></td> 1248 <td><code>ic_menu_archive.png</code></td> 1249 </tr> 1250 <tr> 1251 <td>Status bar icons</td> 1252 <td><code>ic_stat_sys</code> or <code>ic_stat_notify</code></td> 1253 <td><code>ic_stat_notify_msg.png</code></td> 1254 </tr> 1255 <tr> 1256 <td>Tab icons</td> 1257 <td><code>ic_tab</code></td> 1258 <td><code>ic_tab_recent.png</code></td> 1259 </tr> 1260 <tr> 1261 <td>Dialog icons</td> 1262 <td><code>ic_dialog</code></td> 1263 <td><code>ic_dialog_info.png</code></td> 1264 </tr> 1265 </table> 1266 1267 <p>Note that you are not required to use a shared prefix of any type — 1268 doing so is for your convenience only.</p> 1269 1270 1271 <h4>Set up a working space that organizes files for multiple densities</h4> 1272 1273 <p>Developing multiple sets of assets for different screen densities means 1274 creating multiple copies of files. To help keep the multiple copies of files 1275 safe and easier to find, we recommend creating a directory structure in your 1276 working space that organizes asset files per resolution. For example:</p> 1277 1278 <pre>assets/... 1279 ldpi/... 1280 _pre_production/... 1281 <em>working_file</em>.psd 1282 <em>finished_asset</em>.png 1283 mdpi/... 1284 _pre_production/... 1285 <em>working_file</em>.psd 1286 <em>finished_asset</em>.png 1287 hdpi/... 1288 _pre_production/... 1289 <em>working_file</em>.psd 1290 <em>finished_asset</em>.png</pre> 1291 1292 <p>This structure parallels the density-specific structure in which you will 1293 ultimately store the finished assets in your application's resources. Because 1294 the structure in your working space is similar to that of the application, you 1295 can quickly determine which assets should be copied to each application 1296 resources directory. Separating assets by density also helps you detect any 1297 variances in filenames across densities, which is important because 1298 corresponding assets for different densities must share the same filename.</p> 1299 1300 <p>For comparison, here's the resources directory structure of a typical 1301 application: </p> 1302 1303 <pre>res/... 1304 drawable-ldpi/... 1305 <em>finished_asset</em>.png 1306 drawable-mdpi/... 1307 <em>finished_asset</em>.png 1308 drawable-hdpi/... 1309 <em>finished_asset</em>.png</pre> 1310 1311 1312 <h4>Create medium-density assets first</h4> 1313 1314 <p>Since medium density is the baseline for Android, begin your designing work 1315 by creating the <code>mdpi</code> assets. See <a href="#screens-table">Table 1316 1</a>, above, for the actual pixel dimensions of various icon types. When 1317 possible, use vector art or paths within Photoshop layers so that it will be 1318 easier to scale the assets up or down later.</p> 1319 1320 <p>For each discreet asset, or set of like assets that share the same bounding 1321 box dimensions, create a working Photoshop file and save it in the 1322 <code>_pre_production</code> directory. For example: 1323 <code>ic_tabs_phone_mdpi.psd</code>. This will make it easier to locate and edit 1324 individual assets if changes are required. It's also helpful to use a 1325 density-specific suffix in the filename for the working file, to avoid confusion 1326 when editing the files. For example: <code>_mdpi.psd</code>.</p> 1327 1328 <p>From the <code>mdpi</code> working files, save individual flattened assets to 1329 the corresponding density-specific resource directory (in this case, 1330 <code>mdpi/</code>) in your working space.</p> 1331 1332 1333 <h4>Create high- and low-density assets from the medium-density sources</h4> 1334 1335 <p>When you are finished working with your medium-density assets, copy the 1336 working files from the your workspace's <code>mdpi/_pre_production</code> 1337 directory to the corresponding locations in the <code>ldpi</code> and 1338 <code>hdpi</code> directories. If any of the working files use a 1339 density-specific suffix, rename the suffix to match the intended density.</p> 1340 1341 <p>Next, open each working file in the high- and low-density directories and 1342 scale the image up or down to match the intended density. To create an 1343 <code>hdpi</code> asset, scale the image by 150%. To create an <code>ldpi</code> 1344 asset, scale the image down by 75%. To scale the images, follow these steps:</p> 1345 1346 <ol> 1347 <li>Open the working file in Photoshop or similar program.</li> 1348 <li>Under the <strong>Image</strong> menu, choose <strong>Image Size</strong>.</li> 1349 <li>On the Image Size panel, change the Width pop up menu to "percent."</li> 1350 <li>Change the Width value to "150" for <code>hdpi</code> assets and "75" for <code>ldpi</code> assets.</li> 1351 <li>Select the Scale Styles checkbox.</li> 1352 <li>Select the Constrain Proportions checkbox.</li> 1353 <li>Select the Resample Image checkbox and set the pop up menu to "Bicubic (Best for smooth gradients)."</li> 1354 <li>Click <strong>OK</strong>.</li> 1355 </ol> 1356 1357 <p>After you scale each image, save it to the target density-specific resource 1358 directory.</p> 1359 1360 <p>If you are scaling a nine-patch image, see the section below for notes on how 1361 to handle the tick marks at the edge of the image. </p> 1362 1363 1364 <h4>After scaling, redraw bitmap layers as needed</h4> 1365 1366 <p>If you scaled an image up from a bitmap layer, rather than from a vector 1367 layer, those layers may need to be redrawn manually to accommodate the higher 1368 density. For example if a 60x60 circle was painted as a bitmap for 1369 <code>mdpi</code> it will need to be repainted as a 90x90 circle for 1370 <code>hdpi</code>.</p> 1371 1372 1373 <h4>When scaling a nine-patch image, crop tick marks before scaling and replace 1374 them after</h4> 1375 1376 <p>Nine-patch images include tick marks at the outer edge of the image. When you 1377 scale a nine-patch image, the tick marks are also scaled, which produces an 1378 inaccurate result. The recommended way to handle the scaling of nine-patch 1379 images is to remove the tick marks from the source image before scaling and then 1380 manually replace the tick marks at the proper size after scaling.</p> 1381 1382 <p>To more easily determine the tick marks after the working file has been 1383 scaled to a new resolution, first create a temporary duplicate flattened image 1384 which includes the tick marks: </p> 1385 1386 <ol> 1387 <li>Under the <strong>Select</strong> menu choose <strong>All</strong>.</li> 1388 <li>Under the <strong>Edit</strong> menu choose 1389 <strong>Copy Merged</strong>.</li> 1390 <li>Under the <strong>File</strong> menu choose <strong>New</strong> and then 1391 click <strong>OK</strong> on the new panel.</li> 1392 <li>Under the <strong>Edit</strong> choose <strong>Paste</strong>.</li> 1393 </ol> 1394 1395 <p>After creating the temporary copy, go back to the working file and crop 1396 the tick marks out of the working file before scaling the image:</p> 1397 <ol> 1398 <li>Under the <strong>Image</strong> menu, choose the 1399 <strong>Canvas Size</strong> command.</li> 1400 <li>On the Canvas Size panel, subtract 2 pixels from the Width and 1401 Height values.</li> 1402 <li>Set the Anchor to "Center."</li> 1403 <li>Click <strong>OK</strong></li> 1404 </ol> 1405 1406 <p>Scale the working file to the target density. With the working file scaled 1407 and the canvas enlarged so that the tick marks can be repainted:</p> 1408 1409 <ol> 1410 <li>Under the <strong>Image</strong> menu, choose the 1411 <strong>Canvas Size</strong> command.</li> 1412 <li>On the <strong>Canvas Size</strong> panel, add 2 pixels to the Width 1413 and Height values.</li> 1414 <li>Set the Anchor to "Center."</li> 1415 <li>Click <strong>OK</strong>.</li> 1416 </ol> 1417 1418 <p>To determine tick marks, go back to duplicate flattened image and scale it to 1419 the target resolution. </p> 1420 1421 <p>Copy the scaled duplicate flattened image into a new layer in the working 1422 file to use as reference. Create a new layer in which to paint new tick marks at 1423 the single pixel outer edge of the image. Note tickmarks must be 100% opaque 1424 black, without transparency, and all other areas of the tick mark region must be 1425 100% transparent, otherwise the system will not interpret the nine-patch image 1426 correctly. </p> 1427 1428 <p>Using the scaled duplicate flattened image as reference paint new tick marks 1429 in the new layer that align with the reference layer. Note round up pixels for 1430 tick marks. Any pixels that are partially opaque in the reference layer should 1431 be fully opaqe in the new layer.</p> 1432 1433 1434 <h4>Adjust stroke and drop shadow after scaling an image</h4> 1435 1436 <p>While it is desirable to scale layer styles for the most part (such as for 1437 Gradient Overlay or Inner Glow), you may need to manually reset the Stroke and 1438 Drop Shadow in the scaled image to 1 px before saving, especially when scaling 1439 to <code>hdpi</code>. 1440 1441 <h4>Save nine-patch images with the appropriate filename suffix</h4> 1442 1443 <p>If an asset is a nine-patch asset (with tick marks), be sure to save the asset 1444 in PNG format with a filename that includes the <code>.9.png</code> suffix. If 1445 the filename does not use the suffix, the system won't recognize the image as a 1446 nine-patch asset and won't resize it as intended. </p> 1447 1448 1449 <h4>When saving image assets, remove the Photoshop header</h4> 1450 1451 <p>To help keep each image asset as small as possible, make sure to remove the 1452 Photoshop headers from the file. To remove the Photoshop header, follow these 1453 steps: </p> 1454 1455 <ol> 1456 <li>Under the <strong>File</strong> menu, choose the <strong>Save for Web & 1457 Devices</strong> command </li> 1458 <li>On the "Save for Web & Devices" panel, set the Preset pop-up to 1459 "PNG-24," set the pop-up under Presets to "PNG-24" as well, and select the 1460 Transparency box (if the image uses transparency)</li> 1461 <li>Select <strong>Save</strong>.</li> 1462 </ol> 1463 1464 <h4>Make sure that corresponding assets for different densities use the same 1465 filenames</h4> 1466 1467 <p>Corresponding icon asset files for each density must use the same filename, 1468 but be stored in density-specific resource directories. This allows the system 1469 to look up and load the proper resource according to the screen characteristics 1470 of the device. For this reason, make sure that the set of assets in each 1471 directory is consistent and that the files do not use density-specific suffixes. 1472 For more information about density-specific resources and how the system uses 1473 them to meet the needs of different devices, see <a 1474 href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 1475 Screens</a>.</p> 1476 1477 <h2 id="templatespack">Using the Android Icon Templates Pack</h2> 1478 1479 <p>The Android Icon Templates Pack is a collection of template designs, filters, 1480 and settings that make it easier for you to create icons that conform to the 1481 general specifications given in this document. We recommend downloading the 1482 template pack archive before you get started with your icon design.</p> 1483 1484 <p>The icon templates are provided in Adobe Photoshop and Adobe Illustrator file 1485 formats, which preserves the layers and design treatments we used when creating the 1486 standard icons for the Android platform. You can load the template files into any 1487 compatible image-editing program, although your ability to work directly with the 1488 layers and treatments may vary based on the program you are using.</p> 1489 1490 <p>You can obtain the Icon Templates Pack archive using the link below: </p> 1491 1492 <p style="margin-left:2em"><a 1493 href="{@docRoot}shareables/icon_templates-v2.0.zip">Download the Icon Templates 1494 Pack »</a> 1495 1496 1497 <h2 id="iconappendix">Icon appendix</p> 1498 1499 <h3 id="launcherapx">Standard launcher icons</h3> 1500 1501 <p>Shown below are examples of launcher icons used by Android applications. The 1502 icons are provided for your reference only — please do not reuse these 1503 icons in your applications.</code>. 1504 1505 <img src="{@docRoot}images/icon_design/IconGraphic_Icons.png" style="margin-top:2em;" /> 1506 1507 1508 <h3 id="menuapx">Standard menu icons</h3> 1509 1510 <p>Shown below are standard menu icons that are used in the Android 1511 system. Because these resources can change between platform versions, you 1512 should not reference the system's copy of the resources. If you want 1513 use any icons or other internal drawable resources, you should store a 1514 local copy of those icons or drawables in your application resources, 1515 then reference the local copy from your application code. In that way, you can 1516 maintain control over the appearance of your icons, even if the system's 1517 copy changes. Note that the list below is not intended to be complete.</p> 1518 1519 1520 <table class="image-caption"> 1521 <tr> 1522 1523 <td class="image-caption-i image-list"> 1524 <img src="{@docRoot}images/icon_design/ic_menu_add.png" title="ic_menu_add" alt="Android asset" /> 1525 <div class="caption">Add</div></td> 1526 1527 1528 <td class="image-caption-i image-list"> 1529 <img src="{@docRoot}images/icon_design/ic_menu_call.png" title="ic_menu_call" alt="Android asset" /> 1530 <div class="caption">Call</div></td> 1531 1532 1533 <td class="image-caption-i image-list"> 1534 <img src="{@docRoot}images/icon_design/ic_menu_camera.png" title="ic_menu_camera" alt="Android asset" /> 1535 <div class="caption">Camera</div></td> 1536 1537 1538 <td class="image-caption-i image-list"> 1539 <img src="{@docRoot}images/icon_design/ic_menu_close_clear_cancel.png" title="ic_menu_close_clear_cancel" alt="Android asset" /> 1540 <div class="caption">Clear / Close / Cancel / Discard </div></td> 1541 1542 1543 <td class="image-caption-i image-list"> 1544 <img src="{@docRoot}images/icon_design/ic_menu_compass.png" title="ic_menu_compass" alt="Android asset" /> 1545 <div class="caption">Compass</div></td> 1546 1547 1548 <td class="image-caption-i image-list"> 1549 <img src="{@docRoot}images/icon_design/ic_menu_delete.png" title="ic_menu_delete" alt="Android asset" /> 1550 <div class="caption">Delete</div></td> 1551 1552 1553 <td class="image-caption-i image-list"> 1554 <img src="{@docRoot}images/icon_design/ic_menu_directions.png" title="ic_menu_directions" alt="Android asset" /> 1555 <div class="caption">Directions</div></td> 1556 1557 </tr> 1558 <tr> 1559 1560 <td class="image-caption-i image-list"> 1561 <img src="{@docRoot}images/icon_design/ic_menu_edit.png" title="ic_menu_edit" alt="Android asset" /> 1562 <div class="caption">Edit</div></td> 1563 1564 1565 <td class="image-caption-i image-list"> 1566 <img src="{@docRoot}images/icon_design/ic_menu_gallery.png" title="ic_menu_gallery" alt="Android asset" /> 1567 <div class="caption">Gallery</div></td> 1568 1569 1570 <td class="image-caption-i image-list"> 1571 <img src="{@docRoot}images/icon_design/ic_menu_help.png" title="ic_menu_help" alt="Android asset" /> 1572 <div class="caption">Help</div></td> 1573 1574 1575 <td class="image-caption-i image-list"> 1576 <img src="{@docRoot}images/icon_design/ic_menu_info_details.png" title="ic_menu_info_details" alt="Android asset" /> 1577 <div class="caption">Info / details</div></td> 1578 1579 1580 <td class="image-caption-i image-list"> 1581 <img src="{@docRoot}images/icon_design/ic_menu_mapmode.png" title="ic_menu_mapmode" alt="Android asset" /> 1582 <div class="caption">Map mode</div></td> 1583 1584 1585 <td class="image-caption-i image-list"> 1586 <img src="{@docRoot}images/icon_design/ic_menu_mylocation.png" title="ic_menu_mylocation" alt="Android asset" /> 1587 <div class="caption">My Location</div></td> 1588 1589 1590 <td class="image-caption-i image-list"> 1591 <img src="{@docRoot}images/icon_design/ic_menu_more.png" title="ic_menu_more" alt="Android asset" /> 1592 <div class="caption">More</div></td> 1593 1594 </tr> 1595 <tr> 1596 1597 <td class="image-caption-i image-list"> 1598 <img src="{@docRoot}images/icon_design/ic_menu_preferences.png" title="ic_menu_preferences" alt="Android asset" /> 1599 <div class="caption">Preferences</div></td> 1600 1601 1602 <td class="image-caption-i image-list"> 1603 <img src="{@docRoot}images/icon_design/ic_menu_rotate.png" title="ic_menu_rotate" alt="Android asset" /> 1604 <div class="caption">Rotate</div></td> 1605 1606 1607 <td class="image-caption-i image-list"> 1608 <img src="{@docRoot}images/icon_design/ic_menu_save.png" title="ic_menu_save" alt="Android asset" /> 1609 <div class="caption">Save</div></td> 1610 1611 1612 <td class="image-caption-i image-list"> 1613 <img src="{@docRoot}images/icon_design/ic_menu_send.png" title="ic_menu_send" alt="Android asset" /> 1614 <div class="caption">Send</div></td> 1615 1616 1617 <td class="image-caption-i image-list"> 1618 <img src="{@docRoot}images/icon_design/ic_menu_search.png" title="ic_menu_search" alt="Android asset" /> 1619 <div class="caption">Search</div></td> 1620 1621 1622 <td class="image-caption-i image-list"> 1623 <img src="{@docRoot}images/icon_design/ic_menu_share.png" title="ic_menu_share" alt="Android asset" /> 1624 <div class="caption">Share</div></td> 1625 1626 1627 <td class="image-caption-i image-list"> 1628 <img src="{@docRoot}images/icon_design/ic_menu_upload.png" title="ic_menu_upload" alt="Android asset" /> 1629 <div class="caption">Upload</div></td> 1630 1631 </tr> 1632 <tr> 1633 1634 <td class="image-caption-i image-list"> 1635 <img src="{@docRoot}images/icon_design/ic_menu_view.png" title="ic_menu_view" alt="Android asset" /> 1636 <div class="caption">View</div></td> 1637 1638 1639 <td class="image-caption-i image-list"> 1640 <img src="{@docRoot}images/icon_design/ic_menu_zoom.png" title="ic_menu_zoom" alt="Android asset" /> 1641 <div class="caption">Zoom</div></td> 1642 1643 </tr> 1644 </table> 1645 1646 1647 <h3 id="statusbarapx">Standard status bar icons</h3> 1648 1649 <p>Shown below are standard status bar icons that are used in the Android 1650 platform. Because these resources can change between platform versions, you 1651 should not reference the system's copy of the resources. If you want 1652 use any icons or other internal drawable resources, you should store a 1653 local copy of those icons or drawables in your application resources, 1654 then reference the local copy from your application code. In that way, you can 1655 maintain control over the appearance of your icons, even if the system's 1656 copy changes. Note that the list below is not intended to be complete.</p> 1657 1658 1659 <table class="image-caption"> 1660 <tr> 1661 1662 <td class="image-caption-i image-list"> 1663 <img src="{@docRoot}images/icon_design/stat_sys_data_bluetooth.png" title="stat_sys_data_bluetooth" alt="Android asset" /> 1664 <div class="caption">Bluetooth</div></td> 1665 1666 1667 <td class="image-caption-i image-list"> 1668 <img src="{@docRoot}images/icon_design/stat_notify_email_generic.png" title="stat_notify_email_generic" alt="Android asset" /> 1669 <div class="caption">Email</div></td> 1670 1671 1672 <td class="image-caption-i image-list"> 1673 <img src="{@docRoot}images/icon_design/stat_notify_chat.png" title="stat_notify_chat" alt="Android asset" /> 1674 <div class="caption">IM</div></td> 1675 1676 1677 <td class="image-caption-i image-list"> 1678 <img src="{@docRoot}images/icon_design/stat_notify_voicemail.png" title="stat_notify_voicemail" alt="Android asset" /> 1679 <div class="caption">Voicemail</div></td> 1680 1681 1682 <td class="image-caption-i image-list"> 1683 <img src="{@docRoot}images/icon_design/stat_sys_warning.png" title="stat_sys_warning" alt="Android asset" /> 1684 <div class="caption">Warning</div></td> 1685 1686 1687 <td class="image-caption-i image-list"> 1688 <img src="{@docRoot}images/icon_design/stat_sys_phone_call.png" title="stat_sys_phone_call" alt="Android asset" /> 1689 <div class="caption">Call</div></td> 1690 1691 1692 <td class="image-caption-i image-list"> 1693 <img src="{@docRoot}images/icon_design/stat_sys_phone_call_forward.png" title="stat_sys_phone_call_forward" alt="Android asset" /> 1694 <div class="caption">Call forward</div></td> 1695 1696 </tr> 1697 <tr> 1698 1699 <td class="image-caption-i image-list"> 1700 <img src="{@docRoot}images/icon_design/stat_sys_phone_call_on_hold.png" title="stat_sys_phone_call_on_hold" alt="Android asset" /> 1701 <div class="caption">Call on hold</div></td> 1702 1703 1704 <td class="image-caption-i image-list"> 1705 <img src="{@docRoot}images/icon_design/stat_notify_missed_call.png" title="stat_notify_missed_call" alt="Android asset" /> 1706 <div class="caption">Missed call</div></td> 1707 1708 </tr> 1709 </table> 1710 1711