Home | History | Annotate | Download | only in ui_guidelines
      1 page.title=Action Bar Icons
      2 excludeFromSuggestions=true
      3 parent.title=Icon Design Guidelines
      4 parent.link=icon_design.html
      5 @jd:body
      6 
      7 <div id="qv-wrapper">
      8 <div id="qv">
      9 
     10 <h2>In this document</h2>
     11 
     12 <ol>
     13 <li><a href="#icon11">Android 3.0 and Later</a>
     14   <ol>
     15     <li><a href="#size11">Size and format</a></li>
     16     <li><a href="#style11">Style, colors, and effects</a></li>
     17     <li><a href="#examples11">Example icons</a></li>
     18   </ol>
     19 </li>
     20 </ol>
     21 
     22 <h2>See also</h2>
     23 
     24 <ol>
     25 <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
     26 Screens</a></li>
     27 <li><a href="{@docRoot}guide/topics/ui/actionbar.html">Using the Action Bar</a></li>
     28 </ol>
     29 
     30 </div>
     31 </div>
     32 
     33 <div class="note design">
     34 <p><strong>New Guides for App Designers!</strong></p> 
     35 <p>Check out the new documents for designers at <strong><a
     36 href="{@docRoot}design/index.html">Android Design</a></strong>, including more guidelines
     37 for <a href="{@docRoot}design/style/iconography.html">Iconography</a>.</p>
     38 </div>
     39 
     40 
     41 <p>Action Bar icons are graphical elements placed in the <a
     42 href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a> representing individual action
     43 items.</p>
     44 
     45 <p>As described in <a
     46 href="{@docRoot}guide/practices/ui_guidelines/icon_design.html#icon-sets">Providing Density-Specific
     47 Icon Sets</a> and <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
     48 Screens</a>, you should create separate icons for all generalized screen densities, including low-,
     49 medium-, high-, and extra-high-density screens. This ensures that your icons will display properly
     50 across the range of devices on which your application can be installed. See <a
     51 href="{@docRoot}guide/practices/ui_guidelines/icon_design.html#design-tips">Tips for Designers</a>
     52 for suggestions on how to work with multiple sets of icons.</p>
     53 
     54 <p><strong>Final art must be exported as a transparent PNG file. Do not include
     55 a background color</strong>.</p>
     56 
     57 <p>Templates for creating icons in Adobe Photoshop are available in the <a
     58 href="{@docRoot}guide/practices/ui_guidelines/icon_design.html#templatespack">Icon
     59 Templates Pack</a>.</p>
     60 
     61 
     62 
     63 <h2 id="icon11">Android 3.0 and Later</h2>
     64 
     65 <p>The following guidelines describe how to design action bar icons for Android
     66 3.0 (API Level 11) and later.</p>
     67 
     68 
     69 <h3 id="size11">Size and format</h2>
     70 
     71 <p>Action Bar icons should be 32-bit PNGs with an alpha channel for transparency. The finished
     72 action bar icon dimensions, corresponding to a given generalized screen density, are shown in
     73 the table below.</p>
     74 
     75 <p class="table-caption" id="screens_table"><strong>Table 1.</strong> Summary of
     76 finished Action Bar icon dimensions for each generalized screen density.</p>
     77 
     78 <table>
     79   <tbody>
     80   <tr>
     81     <th></th>
     82     <th>
     83       <code>ldpi</code> (120 dpi)<br>
     84       <small style="font-weight: normal">(Low density screen)</small>
     85     </th>
     86     <th>
     87       <code>mdpi</code> (160 dpi)<br>
     88       <small style="font-weight: normal">(Medium density screen)</small>
     89     </th>
     90     <th>
     91       <code>hdpi</code> (240 dpi)<br>
     92       <small style="font-weight: normal">(High density screen)</small>
     93     </th>
     94     <th>
     95       <code>xhdpi</code> (320 dpi)<br>
     96       <small style="font-weight: normal">(Extra-high density screen)</small>
     97     </th>
     98   </tr>
     99   <tr>
    100     <th>
    101       Action Bar Icon Size
    102     </th>
    103     <td>
    104       18 x 18 px
    105     </td>
    106     <td>
    107       24 x 24 px
    108     </td>
    109     <td>
    110       36 x 36 px
    111     </td>
    112     <td>
    113       48 x 48 px
    114     </td>
    115   </tr>
    116   </tbody>
    117 </table>
    118 
    119 
    120 
    121 <h3 id="style11">Style, colors, and effects</h3>
    122 
    123 <p>Action Bar icons are flat, pictured face on, and generally greyscale, depending on the
    124 application's theme. Action Bar icons should not look three-dimensional.</p>
    125 
    126 <p>In order to maintain consistency across the application's Action Bar, all Action Bar icons should
    127 use the same color palette and effects.</p>
    128 
    129 <p>When using the default "Holo Light" or "Holo Dark" themes, icons should use the color palette
    130 and effects shown in Figure 1 and Figure 2, below.</p>
    131 
    132 
    133 
    134 <table class="image-caption">
    135 <tr>
    136 <td class="image-caption-i">
    137   <img src="{@docRoot}images/icon_design/action_bar_holo_light_style.png"
    138     alt="A view of effects for Action Bar icons for the 'Holo Light' theme.">
    139 </td>
    140 <td class="image-caption-c">
    141   <div class="caption grad-rule-top">
    142     <p><strong>Figure 1. </strong>Style and effects for "Holo Light" theme Action Bar icons.</p>
    143     <div class="image-caption-nested">
    144     <table>
    145       <tr><td><em>1.</em></td><td nowrap>Fill color:</td><td><code>#333333</code>, 60% opacity
    146         <br><br></td></tr>
    147       <tr><td><em>2.</em></td><td nowrap>Inner content:</td><td>Inner content should subtract from
    148         the outer shape and consist purely of transparent pixels.</td></tr>
    149     </table>
    150     </div>
    151   </div>
    152 </td>
    153 </tr>
    154 </table>
    155 
    156 <table class="image-caption">
    157 <tr>
    158 <td class="image-caption-i">
    159   <img src="{@docRoot}images/icon_design/action_bar_holo_dark_style.png"
    160     alt="A view of effects for Action Bar icons for the 'Holo Dark' theme.">
    161 </td>
    162 <td class="image-caption-c">
    163   <div class="caption grad-rule-top">
    164     <p><strong>Figure 2. </strong>Style and effects for "Holo Dark" theme Action Bar icons.</p>
    165     <div class="image-caption-nested">
    166     <table>
    167       <tr><td><em>1.</em></td><td nowrap>Fill color:</td><td><code>#ffffff</code>, 80% opacity
    168         <br><br></td></tr>
    169       <tr><td><em>2.</em></td><td nowrap>Inner content:</td><td>Inner content should subtract from
    170         the outer shape and consist purely of transparent pixels.</td></tr>
    171     </table>
    172     <p class="note"><strong>Note: </strong> icons should should have a transparent background;
    173       the dark background here is for effect only.</p>
    174     </div>
    175   </div>
    176 </td>
    177 </tr>
    178 </table>
    179 
    180 
    181 
    182 
    183 <h3 id="examples11">Example icons</h3>
    184 
    185 <p>Shown below are example extra-high-density Action Bar icons that are used throughout Android
    186 system applications.</p>
    187 
    188 <p class="warning"><strong>Warning:</strong> Because resources can change between platform versions,
    189 you should not reference built-in icons using the Android platform resource IDs (i.e. menu or Action
    190 Bar icons under <code>android.R.drawable</code>). If you want to use any icons or other internal
    191 drawable resources, you should store a local copy of those icons or drawables in your application
    192 resources, then reference the local copy from your application code. In that way, you can maintain
    193 control over the appearance of your icons, even if the system's copy changes. Note that the grid
    194 below is not intended to be complete.</p>
    195 
    196 <img src="{@docRoot}images/icon_design/action_bar_examples.png" />
    197