1page.title=Menu Icons 2excludeFromSuggestions=true 3parent.title=Icon Design Guidelines 4parent.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<li><a href="#icon9">Android 2.3</a> 15 <ol> 16 <li><a href="#size9">Size</a></li> 17 <li><a href="#style9">Style, colors, and effects</a></li> 18 <li><a href="#dodonts9">Do's and don'ts</a></li> 19 <li><a href="#examples9">Example icons</a></li> 20 </ol> 21</li> 22<li><a href="#icon1">Android 2.2 and Earlier</a></li> 23</ol> 24 25<h2>See also</h2> 26 27<ol> 28<li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 29Screens</a></li> 30</ol> 31 32</div> 33</div> 34 35 36<div class="note design"> 37<p><strong>New Guides for App Designers!</strong></p> 38<p>Check out the new documents for designers at <strong><a 39href="{@docRoot}design/index.html">Android Design</a></strong>, including more guidelines 40for <a href="{@docRoot}design/style/iconography.html">Iconography</a>.</p> 41</div> 42 43 44<p>Menu icons are graphical elements placed in the options menu shown to users 45when they press the Menu button. They are drawn in a flat-front perspective and 46in greyscale. Elements in a menu icon must not be visualized in 3D or 47perspective.</p> 48 49<p>As described in <a 50href="{@docRoot}guide/practices/ui_guidelines/icon_design.html#icon-sets">Providing Density-Specific 51Icon Sets</a> and <a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple 52Screens</a>, you should create separate icons for all generalized screen densities, including low-, 53medium-, high-, and extra-high-density screens. This ensures that your icons will display properly 54across the range of devices on which your application can be installed. See <a 55href="{@docRoot}guide/practices/ui_guidelines/icon_design.html#design-tips">Tips for Designers</a> 56for suggestions on how to work with multiple sets of icons.</p> 57 58<p><strong>Final art must be exported as a transparent PNG file. Do not include 59a background color</strong>.</p> 60 61<p>Templates for creating icons in Adobe Photoshop are available in the <a 62href="{@docRoot}guide/practices/ui_guidelines/icon_design.html#templatespack">Icon 63Templates Pack</a>.</p> 64 65 66<h2 id="icon11">Android 3.0 and Later</h2> 67 68<p>As of Android 3.0, the options menu has been superseded by the <a 69href="{@docRoot}guide/topics/ui/actionbar.html">Action Bar</a>. Please refer to the <a 70href="icon_design_action_bar.html">Action Bar Icon Design Guidelines</a> for recommendations on 71creating icons for action items.</p> 72 73 74<h2 id="icon9">Android 2.3</h2> 75 76<p class="caution"><strong>Caution:</strong> The style and content sizing of 77menu icons have changed in Android 2.3 compared to 78<a href="#icon1">previous versions</a>: 79<br> 801. Icons have a larger safe frame; icon content is smaller within the full 81asset. Final asset sizes have not changed. 82<br> 832. The color palette is slightly lighter. 84<br> 853. No outer glow effects are applied. 86<br> 874. Menu icons can now be rendered on either dark or light backgrounds. 88 89</p> 90 91<p>The following guidelines describe how to design menu icons for Android 922.3 (API Levels 9 and 10).</p> 93 94<h3 id="size9">Size and positioning</h3> 95 96<p>Menu icons can use a variety of shapes and forms and must be scaled and 97positioned inside the asset to create consistent visual weight with other 98icons.</p> 99 100<p>Figure 1 illustrates various ways of positioning the icon inside the 101asset. You should size the icons <em>smaller than the actual bounds of the 102asset</em>, to create a consistent visual weight. If your icon is square or 103nearly square, it should be scaled even smaller.</p> 104 105<p>In order to indicate the recommended size for the icon, each example in 106Figure 1 includes three different guide rectangles:</p> 107 108<ul> 109<li>The red box is the bounding box for the full asset.</li> 110<li>The blue box is the recommended bounding box for the actual icon. 111The icon box is sized smaller than the full asset box to allow for 112varying icon shapes while maintaining a consistent visual weight.</li> 113<li>The orange box is the recommended bounding box for the actual icon when 114the content is square. The box for square icons is smaller than that for other 115icons to establish a consistent visual weight across the two types.</li> 116</ul> 117 118<table> 119<tr> 120 121<td style="border:0;"> 122<ol class="nolist"> 123 <li>Menu icon dimensions for high-density (<code>hdpi</code>) screens:</li> 124 <ol class="nolist"> 125 <li>Full Asset: 72 x 72 px</li> 126 <li>Icon: 48 x 48 px</li> 127 <li>Square Icon: 44 x 44 px</li> 128 </ol> 129 </li> 130</ol> 131</td> 132<td style="border:0;"> 133 <img src="{@docRoot}images/icon_design/menu_size_hdpi.png" width="450"> 134</td> 135</tr> 136<tr> 137<td style="border:0;"> 138 <ol class="nolist"> 139 <li>Menu icon dimensions for medium-density (<code>mdpi</code>) screens:</li> 140 <ol class="nolist"> 141 <li>Full Asset: 48 x 48 px</li> 142 <li>Icon: 32 x 32 px</li> 143 <li>Square Icon: 30 x 30 px</li> 144 </ol> 145 </li> 146</ol> 147</td> 148 149<td style="border:0;"> 150 <img src="{@docRoot}images/icon_design/menu_size_mdpi.png" width="450"> 151</td> 152</tr> 153<tr> 154<td style="border:0;"> 155 <ol class="nolist"> 156 <li>Menu icon dimensions for low-density (<code>ldpi</code>) screens:</li> 157 <ol class="nolist"> 158 <li>Full Asset: 36 x 36 px</li> 159 <li>Icon: 24 x 24 px</li> 160 <li>Square Icon: 22 x 22 px</li> 161 </ol> 162 </li> 163</ol> 164</td> 165 166<td style="border:0;"> 167 <img src="{@docRoot}images/icon_design/menu_size_ldpi.png" width="450"> 168</td> 169</tr> 170 171<tr> 172<td style="border:0;"></td> 173<td style="border:0;"> 174 <p class="table-caption"><strong>Figure 1.</strong> 175 Menu icon sizing and positioning inside the bounds of the 176 icon asset.</p> 177</td> 178</tr> 179 180</table> 181 182 183 184 185<h3 id="style9">Style, colors, and effects</h3> 186 187<p>Menu icons are flat, pictured face on, and greyscale. A slight deboss and 188some other effects, which are shown below, are used to create depth. Menu icons 189should include rounded corners, but only when logically appropriate.</p> 190 191<p>In order to maintain consistency, all menu icons must use the same 192color palette and effects, as shown in Figure 2.</p> 193 194 195 196<table class="image-caption"> 197<tr> 198<td class="image-caption-i"> 199 <img src="{@docRoot}images/icon_design/menu_style.png" alt="A view of light, effects, and shadows for menu icons."/> 200</td> 201<td class="image-caption-c"> 202 <div class="caption grad-rule-top"> 203 <p><strong>Figure 2. </strong>Style, light and effects for menu icons.</p> 204 <div class="image-caption-nested"> 205 <p><em>Note: all pixel dimensions are for medium density and should be scaled appropriately for other densities.</em></p> 206 <table> 207 <tr><td><em>1.</em></td><td nowrap>Corner rounding:</td><td>2 pixel corner radius, when appropriate<br><br></td></tr> 208 <tr><td><em>2.</em></td><td nowrap>Fill gradient:</td><td>90°, from <code>#8C8C8C</code> to <code>#B2B2B2</code><br><br></td></tr> 209 <tr><td><em>3.</em></td><td nowrap>Inner shadow:</td><td><code>#000000</code>, 20% opacity<br>angle 90°<br>distance 2px<br>size 2px<br><br></td></tr> 210 <tr><td><em>4.</em></td><td nowrap>Inner bevel:</td><td>depth 1%<br>direction down<br>size 0px<br>angle 90°<br>altitude 10°<br>highlight <code>#ffffff</code>, 70% opacity<br>shadow <code>#000000</code>, 25% opacity</td></tr> 211 </table> 212 </div> 213 </div> 214</td> 215</tr> 216</table> 217 218 219 220 221<h3 id="dodonts9">Do's and don'ts</h3> 222 223<p>Below are some "do and don't" examples to consider when creating menu icons for 224your application. </p> 225 226 227<img src="{@docRoot}images/icon_design/do_dont_menuicons.png"> 228 229 230 231 232<h3 id="examples9">Example icons</h3> 233 234<p>Shown below are standard high-density menu icons that are used in the Android 235platform.</p> 236 237<p class="warning"><strong>Warning:</strong> Because these resources can change 238between platform versions, you should not reference these icons using the 239Android platform resource IDs (i.e. menu icons under 240<code>android.R.drawable</code>). If you want to use any icons or other internal 241drawable resources, you should store a local copy of those icons or drawables in 242your application resources, then reference the local copy from your application 243code. In that way, you can maintain control over the appearance of your icons, 244even if the system's copy changes. Note that the grid below is not intended to 245be complete.</p> 246 247<img src="{@docRoot}images/icon_design/menu_standard.png" /> 248 249 250 251 252<h2 id="icon1">Android 2.2 and Earlier</h2> 253 254<p>The following guidelines describe how to design menu icons for Android 2.2 255(API Level 4) and earlier. Menu icons in Android 2.2 and below are drawn in a 256flat-front perspective. Elements in a menu icon must not be visualized in 3D or 257perspective.</p> 258 259<h3 id="structure1">Structure</h3> 260 261<ul> 262<li>In order to maintain consistency, all menu icons must use the same 263primary palette and the same effects. For more information, see the 264menu icon <a href="#palette1">color palette</a>. </li> 265 266<li>Menu icons should include rounded corners, but only when logically 267appropriate. For example, in Figure 3 the logical place for rounded corners is 268the roof and not the rest of the building.</span></li> 269 270<li>All dimensions specified on this page are based on a 48x48 pixel artboard 271size with a 6 pixel safeframe.</li> 272 273<li>The menu icon effect (the outer glow) described in <a 274href="#style1">Light, effects, and shadows</a> can overlap the 6px safeframe, 275but only when necessary. The base shape must always stay inside the 276safeframe.</li> 277 278<li><strong>Final art must be exported as a transparent PNG file.</strong></li> 279 280<li>Templates for creating menu icons in Adobe Photoshop are available in the 281Icon Templates Pack.</li> 282</ul> 283 284<table class="image-caption"> 285<tr> 286<td class="image-caption-i"> 287 <img src="{@docRoot}images/icon_design/menu_structure.png" alt="A view of menu 288icon structure." /> 289</td> 290<td class="image-caption-c"> 291 <div class="caption grad-rule-top"> 292 <p><strong>Figure 3. </strong>Safeframe and corner-rounding for menu 293icons. Icon size is 48x48.</p> 294 </div> 295</td> 296</tr> 297</table> 298 299 300<h3 id="style1">Light, effects, and shadows</h3> 301 302<p>Menu icons are flat and pictured face on. A slight deboss and some other 303effects, which are shown below, are used to create depth.</p> 304 305<table class="image-caption"> 306<tr> 307<td class="image-caption-i"> 308 <img src="{@docRoot}images/icon_design/menu_light.png" alt="A view of light, effects, and shadows for launcher icons."/> 309</td> 310<td class="image-caption-c"> 311 <div class="caption grad-rule-top"> 312 <p><strong>Figure 4. </strong>Light, effects, and shadows for launcher icons.</p> 313 <div class="image-caption-nested"> 314 <table> 315 <tr><td><em>1.</em></td><td>Front part:</td><td>Use fill gradient from primary color palette</td></tr> 316 <tr><td><em>2.</em></td><td>Inner shadow:</td><td>black | 20 % opacity<br>angle 90° | distance 2px<br>size 2px</td></tr> 317 <tr><td><em>3.</em></td><td>Outer glow:</td><td>white | 55% opacity <br>spread 10% | size 3px</td></tr> 318 <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> 319 </table> 320 </div> 321 </div> 322</td> 323</tr> 324</table> 325 326<table> 327<tr> 328<td style="border:0"> 329 330<h4 id="palette1">Color palette</h4> 331 332<table> 333<tr> 334<td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_white.png"/></td> 335<td class="image-caption-c">White<br>r 255 | g 255 | b 255<br>Used for outer glow and bevel highlight.</td> 336</tr> 337 338<tr> 339<td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_gradient_medium.png"/></td> 340<td class="image-caption-c">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> 341</tr> 342 343<tr> 344<td class="image-caption-i"><img src="{@docRoot}images/icon_design/menu_palette_black.png"/></td> 345<td class="image-caption-c">Black<br>r 0 | g 0 | b 0<br>Used for inner shadow and bevel shadow.</td> 346</tr> 347 348</table> 349 350</td> 351 352<td style="border:0"> 353 354<h4 id="steps1">Step by step</h4> 355 356<ol> 357<li>Create the basic shapes using a tool like Adobe Illustrator.</li> 358<li>Import the shape into a tool like Adobe Photoshop and scale to fit an image 359of 48x48 px on a transparent background. Mind the safeframe.</li> 360<li>Add the effects seen as described in Figure 4.</li> 361<li>Export the icon at 48x48 as a PNG file with transparency enabled.</li> 362</ol> 363 364</td> 365</tr> 366</table> 367