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