OSDN Git Service

original
[gb-231r1-is01/Gingerbread_2.3.3_r1_IS01.git] / frameworks / base / docs / html / guide / practices / ui_guidelines / icon_design_status_bar.jd
1 page.title=Status Bar Icons
2 parent.title=Icon Design Guidelines
3 parent.link=icon_design.html
4 @jd:body
5
6 <div id="qv-wrapper">
7 <div id="qv">
8
9 <h2>In this document</h2>
10
11 <ol>
12 <li><a href="#icon9">Android 2.3 and Later</a>
13   <ol>
14     <li><a href="#size9">Size</a></li>
15     <li><a href="#style9">Style, color, and effects</a></li>
16     <li><a href="#dodonts9">Do's and don'ts</a></li>
17     <li><a href="#examples9">Example icons</a></li>
18   </ol>
19 </li>
20 <li><a href="#icon1">Android 2.2 and Earlier</a></li>
21 </ol>
22
23 <h2>See also</h2>
24
25 <ol>
26 <li><a href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
27 Screens</a></li>
28 </ol>
29
30 </div>
31 </div>
32
33
34
35 <p>Status bar icons are used to represent notifications from your application in
36 the status bar.</p>
37
38 <p>As described in <a href="icon_design.html#icon-sets">Providing
39 Density-Specific Icon Sets</a>, you should create separate icon sets for low-,
40 medium-, and high-density screens. This ensures that your icons will display
41 properly across the range of devices on which your application can be installed.
42 See <a href="icon_design.html#design-tips">Tips for Designers</a> for
43 suggestions on how to work with multiple sets of icons.</p>
44
45 <p><strong>Final art must be exported as a transparent PNG file. Do not include
46 a background color</strong>.</p>
47
48 <p>Templates for creating icons in Adobe Photoshop are available in the <a
49 href="{@docRoot}guide/practices/ui_guidelines/icon_design.html#templatespack">Icon
50 Templates Pack</a>.</p>
51
52
53 <p class="warning"><strong>Warning:</strong>
54
55 The style and dimensions of status bar icons have changed drastically in
56 Android 2.3 compared to <a href="#icon1">previous versions</a>. <strong>To
57 provide support for all Android versions</strong>, developers should:
58 <br>
59 1. Place status bar icons for Android 2.3 and higher in the
60 <code>drawable-hdpi-v9</code>, <code>drawable-mdpi-v9</code>, and <code>drawable-ldpi-v9</code> directories.
61 <br>
62 2. Place status bar icons for previous versions in
63 <code>drawable-hdpi</code>, <code>drawable-mdpi</code>, and <code>drawable-ldpi</code> directories.
64
65 </p>
66
67
68
69 <h2 id="icon9">Android 2.3 and Later</h2>
70
71 <p>The following guidelines describe how to design status bar icons for Android
72 2.3 (API Level 9) and later.</p>
73
74 <h3 id="size9">Size and positioning</h3>
75
76 <p>Status bar icons should use simple shapes and forms and those must be
77 scaled and positioned inside the final asset.</p>
78
79 <p>Figure 1 illustrates various ways of positioning the icon inside the
80 asset. You should size the icons <em>smaller than the actual bounds of the
81 asset</em>. <strong>Status bar icons may vary in width, but only
82 minimally.</strong></p>
83
84 <p>In order to indicate the recommended size for the icon, each example in
85 Figure 1 includes two different guide rectangles:</p>
86
87 <ul>
88 <li>The red box is the bounding box for the full asset.</li>
89 <li>The blue box is the recommended bounding box for the actual icon.
90 The icon box is sized smaller vertically than the full asset box to allow for
91 varying icon shapes while maintaining a consistent visual weight.</li>
92 </ul>
93
94 <table>
95 <tr>
96
97 <td style="border:0;">
98 <ol class="nolist">
99   <li>Status bar icon dimensions for high-density (<code>hdpi</code>) screens:</li>
100   <ol class="nolist">
101     <li>Full Asset: 24w x 38h px (preferred, width may vary)</li>
102     <li>Icon: 24w x 24h px (preferred, width may vary)</li>
103   </ol>
104   </li>
105 </ol>
106 </td>
107 <td style="border:0;">
108   <img src="{@docRoot}images/icon_design/statusbar_size_hdpi.png" width="318">
109 </td>
110 </tr>
111 <tr>
112 <td style="border:0;">
113   <ol class="nolist">
114   <li>Status bar icon dimensions for medium-density (<code>mdpi</code>) screens:</li>
115     <ol class="nolist">
116       <li>Full Asset: 16w x 25 px (preferred, width may vary)</li>
117       <li>Icon: 16w x 16w px (preferred, width may vary)</li>
118     </ol>
119   </li>
120 </ol>
121 </td>
122
123 <td style="border:0;">
124  <img src="{@docRoot}images/icon_design/statusbar_size_mdpi.png" width="318">
125 </td>
126 </tr>
127 <tr>
128 <td style="border:0;">
129   <ol class="nolist">
130   <li>Status bar icon dimensions for low-density (<code>ldpi</code>) screens:</li>
131     <ol class="nolist">
132       <li>Full Asset: 12w x 19h px (preferred, width may vary)</li>
133       <li>Icon: 12w x 12h px (preferred, width may vary)</li>
134     </ol>
135   </li>
136 </ol>
137 </td>
138
139 <td style="border:0;">
140  <img src="{@docRoot}images/icon_design/statusbar_size_ldpi.png" width="318">
141 </td>
142 </tr>
143
144 <tr>
145 <td style="border:0;"></td>
146 <td style="border:0;">
147  <p class="table-caption"><strong>Figure 1.</strong>
148  Status bar icon sizing and positioning inside the bounds of the
149  icon asset.</p>
150 </td>
151 </tr>
152
153 </table>
154
155
156
157
158 <h3 id="style9">Style, colors, and effects</h3>
159
160 <p>Status bar icons are flat, matte, and pictured face-on.</p>
161
162
163 <table class="image-caption">
164 <tr>
165 <td class="image-caption-i">
166   <img src="{@docRoot}images/icon_design/statusbar_style.png" alt="A view of effects for status bar icons."/>
167 </td>
168 <td class="image-caption-c">
169   <div class="caption grad-rule-top">
170     <p><strong>Figure 2. </strong>Style and effects for status icons.</p>
171     <div class="image-caption-nested">
172     <p><em>Note: all pixel dimensions are for medium density and should be scaled appropriately for other densities.</em></p>
173     <table>
174     <tr><td><em>1.</em></td><td nowrap>Fill gradient:</td><td>90&deg;, from <code>#828282</code> to <code>#919191</code><br><br></td></tr>
175     <tr><td><em>2.</em></td><td nowrap>Inner shadow:</td><td><code>#FFFFFF</code>, 10% opacity<br>angle 90&deg;<br>distance 1px<br>size 0px<br><br></td></tr>
176     <tr><td><em>3.</em></td><td nowrap>Inner content:</td><td>Inner content should subtract from the outer shape and consist purely of transparent pixels.</td></tr>
177     </table>
178     </div>
179   </div>
180 </td>
181 </tr>
182 </table>
183
184
185
186
187 <h3 id="dosdonts9">Do's and don'ts</h3>
188
189 <p>Below are some "do and don't" examples to consider when creating status bar icons for
190 your application. </p>
191
192
193 <img src="{@docRoot}images/icon_design/do_dont_statusicons.png">
194
195
196
197
198 <h3 id="examples9">Example icons</h3>
199
200 <p>Shown below are standard high-density status bar icons that are used in
201 the Android platform.</p>
202
203 <p class="warning"><strong>Warning:</strong> Because these resources can change
204 between platform versions, you should not reference these icons using the
205 Android platform resource IDs (i.e. status bar icons under
206 <code>android.R.drawable</code>). If you want to use any icons or other internal
207 drawable resources, you should store a local copy of those icons or drawables in
208 your application resources, then reference the local copy from your application
209 code. In that way, you can maintain control over the appearance of your icons,
210 even if the system's copy changes. Note that the grid below is not intended to
211 be complete.</p>
212
213 <img src="{@docRoot}images/icon_design/statusbar_standard.png" />
214
215
216
217 <h2 id="icon1">Android 2.2 and Earlier</h2>
218
219 <p>The following guidelines describe how to design status bar icons for Android
220 2.2 (API Level 8) and earlier.</p>
221
222 <h3 id="structure1">Structure</h3>
223
224 <ul>
225 <li>Rounded corners must always be applied to the base shape and to the details
226 of a status bar icon shown Figure 3.</li>
227
228 <li>All dimensions specified are based on a 25x25 pixel artboard size with a 2
229 pixel safeframe.</li>
230
231 <li>Status bar icons can overlap the safeframe to the left and right when
232 necessary, but must not overlap the safeframe at the top and bottom.</li>
233
234 <li><strong>Final art must be exported as a transparent PNG file.</strong></li>
235
236 <li>Templates for creating status bar icons using Adobe Photoshop are available
237 in the Icon Templates Pack.</li>
238 </ul>
239
240 <table class="image-caption">
241 <tr>
242 <td class="image-caption-i">
243   <img src="{@docRoot}images/icon_design/statusbar_structure.png" alt="A view of
244 status bar icon structure." />
245 </td>
246 <td class="image-caption-c">
247   <div class="caption grad-rule-top">
248     <p><strong>Figure 3. </strong>Safeframe and corner-rounding for status bar
249 icons. Icon size is 25x25.</p>
250   </div>
251 </td>
252 </tr>
253 </table>
254
255
256 <h3 id="style1">Light, effects, and shadows</h3>
257
258 <p>Status bar icons are slightly debossed, high in contrast, and pictured
259 face-on to enhance clarity at small sizes.</p>
260
261 <table class="image-caption">
262 <tr>
263 <td class="image-caption-i">
264   <img src="{@docRoot}images/icon_design/statusbar_light.png"/>
265 </td>
266 <td class="image-caption-c">
267   <div class="caption grad-rule-top">
268     <p><strong>Figure 4. </strong>Light, effects, and shadows for status bar icons.</p>
269     <div class="image-caption-nested">
270     <table>
271     <tr><td><em>1.</em></td><td>Front part:</td><td>Use fill gradient from primary color palette</td></tr>
272     <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>
273     <tr><td><em>3.</em></td><td>Detail:</td><td>white</td></tr>
274     <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>
275     </table>
276     </div>
277   </div>
278 </td>
279 </tr>
280 </table>
281
282 <table>
283 <tr>
284 <td style="border:0">
285
286 <h4 id="palette1">Color palette</h4>
287
288 <p>Only status bar icons related to the phone function use full color; all other status bar icons should remain monochromatic.</p>
289
290 <table>
291 <tr>
292 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_white.png"/></td>
293 <td class="image-caption-c">White<br>r 255 | g 255 | b 255<br>Used for details within the icons and bevel highlight.</td>
294 </tr>
295
296 <tr>
297 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_grey.png"/></td>
298 <td class="image-caption-c">Grey gradient<br><em>1:&nbsp;&nbsp;</em>r 169 | g 169 | b 169<br><em>2:&nbsp;&nbsp;</em>r 126 | g 126 | b 126<br>Used for disabled details within the icon.</td>
299 </tr>
300
301 <tr>
302 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_fill.png"/></td>
303 <td class="image-caption-c">Fill gradient<br><em>1:&nbsp;&nbsp;</em>1 r 105 | g 105 | b 105<br><em>2:&nbsp;&nbsp;</em>r 10   | g 10   | b 10<br>Used as color fill.</td>
304 </tr>
305
306 <tr>
307 <td class="image-caption-i"><img src="{@docRoot}images/icon_design/statusbar_palette_black.png"/></td>
308 <td class="image-caption-c">Black<br>r 0 | g 0 | b 0<br>Used for bevel shadow.</td>
309 </tr>
310
311 </table>
312
313 </td>
314
315 <td style="border:0">
316
317 <h4 id="steps1">Step by step</h4>
318
319 <ol>
320 <li>In a tool like Adobe Photoshop, create the base shape within a 25x25 px
321 image on a transparent background. Mind the safeframe, and keep the upper and
322 lower 2 pixels free.</li>
323 <li>Add rounded corners as specified in Figure 3.</li>
324 <li>Add light, effects, and shadows as specified in Figure 4.</li>
325 <li>Export the icon at 25x25 as a PNG file with transparency enabled.</li>
326 </ol>
327
328 </td>
329 </tr>
330 </table>