blob: 9ca6a04159b5af8b219865b9d9550c630249f2d3 [file] [log] [blame]
Scott Maind41ff8e2011-01-21 14:51:33 -08001page.title=Android 3.0 Platform Preview
Scott Main7fb538c2011-01-19 21:11:50 -08002@jd:body
3
4<div id="qv-wrapper">
5<div id="qv">
6
7<h2>In this document</h2>
8<ol>
9 <li><a href="#api">API Overview</a></li>
10 <li><a href="#api-level">API Level</a></li>
11 <li><a href="#apps">Built-in Applications</a></li>
12 <li><a href="#locs">Locales</a></li>
13 <li><a href="#skins">Emulator Skins</a></li>
14</ol>
15
16<h2>Reference</h2>
17<ol>
18<li><a
19href="{@docRoot}sdk/api_diff/honeycomb/changes.html">API
20Differences Report &raquo;</a> </li>
21</ol>
22
23<h2>See Also</h2>
24<ol>
25 <li><a href="{@docRoot}sdk/preview/start.html">Getting Started</a></li>
26</ol>
27
28</div>
29</div>
30
Scott Maind41ff8e2011-01-21 14:51:33 -080031<p><em>API Level:</em> <b>Honeycomb</b></p>
Scott Main7fb538c2011-01-19 21:11:50 -080032
33<p>For developers, the Android 3.0 preview is available as a downloadable component for the
Scott Maind41ff8e2011-01-21 14:51:33 -080034Android SDK.</p>
35
36<p class="note"><strong>Note:</strong> Read the <a
37href="{@docRoot}sdk/preview/start.html">Getting Started</a> guide for important information
38about setting up your development environment and limitiations of the Android 3.0 preview.</p>
39
40
41
Scott Main7fb538c2011-01-19 21:11:50 -080042
43
44
45
46<h2 id="#api">API Overview</h2>
47
48<p>The sections below provide a technical overview of what's new for developers in Android 3.0,
49including new features and changes in the framework API since the previous version.</p>
50
51
Scott Main7fb538c2011-01-19 21:11:50 -080052<h3>Fragments</h3>
53
54<p>A fragment is a new framework component that allows you to separate distinct elements of an
55activity into self-contained modules that define their own UI and lifecycle. To create a
56fragment, you must extend the {@link android.app.Fragment} class and implement several lifecycle
57callback methods, similar to an {@link android.app.Activity}. You can then combine multiple
58fragments in a single activity to build a multi-pane UI in which each
59pane manages its own lifecycle and user inputs.</p>
60
61<p>You can also use a fragment without providing a UI and instead use the fragment as a worker
62for the activity, such as to manage the progress of a download that occurs only while the
63activity is running.</p>
64
65<p>Additionally:</p>
66
67<ul>
68 <li>Fragments are self-contained and can be reused in multiple activities</li>
69 <li>Fragments can be added, removed, replaced and animated inside the activity</li>
70 <li>Fragment can be added to a back stack managed by the activity, preserving the state of
71fragments as they are changed and allowing the user to navigate backward through the different
72states</li>
73 <li>By <a
74href="{@docRoot}guide/topics/resources/providing-resources.html#AlternativeResources">providing
75alternative resources</a>, you can mix and match fragments, based
76on the screen size and orientation</li>
77 <li>Fragments have direct access to their container activity and can contribute items to the
78activity's Action Bar (discussed next)</li>
79</ul>
80
81<p>To manage the fragments in your activity, you must use the {@link
82android.app.FragmentManager}, which provides several APIs for interacting with fragments, such
83as finding fragments in the activity and popping fragments off the back stack to restore them
84after they've been removed or hidden.</p>
85
86<p>To perform transactions, such as add or remove fragments, you must create a {@link
87android.app.FragmentTransaction}. You can then call methods such as {@link
88android.app.FragmentTransaction#add add()} {@link android.app.FragmentTransaction#remove
89remove()}, {@link android.app.FragmentTransaction#replace replace()}. Once you've applied all
90the changes you want to perform for the transaction, you must call {@link
91android.app.FragmentTransaction#commit commit()} and the system will apply the transaction to
92the activity.</p>
93
94<p>For more information about using fragments in your application, read the <a
95href="{@docRoot}guide/topics/fundamentals/fragments.html">Fragments</a> developer guide.</p>
96
97
98
99
100<h3>Action Bar</h3>
101
102<p>The Action Bar is a replacement for the traditional title bar at the top of the activity
103window. It includes the application logo in the left corner and also replaces the previous Options
104Menu UI with a drop-down list for the menu items. Additionally, the Action Bar allows you
105to:</p></p>
106
107<ul>
108 <li>Include select menu items directly in the Action Bar&mdash;as "action
109items"&mdash;for quick access to global actions.
110 <p>In your XML declaration for the menu item, include the attribute, {@code
111android:showAsAction} with a value of {@code "ifRoom"}. When there's enough room in the
112Action Bar, the menu item appears directly in the bar. Otherwise, it is placed in the
113overflow menu, revealed by the icon on the right side of the Action Bar.</p></li>
114 <li>Add interactive widgets ("action views"), such as a search box.
115 <p>In your XML, include the attribute, {@code android:actionViewLayout} with a layout
116resource for the action view, or {@code android:actionViewClass} with the class name of the
117widget. Like action items, an action view appears only when there's room for it in the Action
118Bar. If there's not enough room, it is placed in the overflow menu and behaves like a regular
119menu item (for example, an item can provide a {@link android.widget.SearchView} as an action
120view, but when in the overflow menu, selecting the item will activate the search dialog).</p>
121 <p></p></li>
122 <li>Add an action to the application logo when tapped and replace it with a custom logo
123 <p>The application logo is automatically assigned the {@code android.R.id.home} ID,
124which is delivered to your activity's {@link android.app.Activity#onOptionsItemSelected
125onOptionsItemSelected()} callback when tapped. Simply respond to this ID in your callback
126method to perform an action such as go to your application's "home" activity.</p>
127 <p>If your activity does not respond to the icon action, you should hide it by calling {@link
128android.app.ActionBar#setDisplayShowHomeEnabled setDisplayShowHomeEnabled(false)}.</p>
129 <p>By default, this is true, so the icon will visually respond when pressed, even if you don't
130respond. Thus, you should remove the icon if you don't respond to it.</p></li>
131 <li>Add breadcrumbs for navigating backward through fragments</li>
132 <li>Add built in tabs and a drop-down list for navigation</li>
133 <li>Customize the Action Bar themes and custom backgrounds</li>
134</ul>
135
136<p>The Action Bar is standard for all applications that set either the <a
137href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#min">{@code
138android:minSdkVersion}</a> or <a
139href="{@docRoot}guide/topics/manifest/uses-sdk-element.html#target">{@code
140android:targetSdkVersion}</a> to {@code "Honeycomb"}. (The "Honeycomb" API Level is provisional
141and effective only while using the preview SDK&mdash;you must change it to the official API
142Level when the final SDK becomes available.)</p>
143
144<p>For more information, read the <a href="{@docRoot}guide/topics/ui/actionbar.html">Action
145Bar</a> developer guide.</p>
146
147
148
149
150<h3>System clipboard</h3>
151
152<p>Applications can now copy and paste data (beyond mere text) to and from the system-wide
153clipboard. Clipped data can be plain text, a URI, or an intent.</p>
154
155<p>By providing the system access to your data in a content provider, the user can copy complex
156content (such as an image or data structure) from your application and paste it into another
157application that supports that type of content.</p>
158
159<p>To start using the clipboard, get the global {@link android.content.ClipboardManager} object
160by calling {@link android.content.Context#getSystemService getSystemService(CLIPBOARD_SERVICE)}.</p>
161
162<p>To create an item to attach to the clipboard, you need to create a new {@link
163android.content.ClipData} object, which holds one or more {@link android.content.ClipData.Item}
164objects, each describing a single entity. To create a {@link android.content.ClipData} object with
165just one {@link android.content.ClipData.Item}, you can use one of the helper methods such as,
166{@link android.content.ClipData#newPlainText newPlainText()}, {@link
167android.content.ClipData#newUri newUri()}, and {@link android.content.ClipData#newIntent
168newIntent()}, which each return a {@link android.content.ClipData} object pre-loaded with the
169appropriate {@link android.content.ClipData.Item}.</p>
170
171<p>To add the {@link android.content.ClipData} to the clipboard, pass it to {@link
172android.content.ClipboardManager#setPrimaryClip setPrimaryClip()} for your instance of {@link
173android.content.ClipboardManager}.</p>
174
175<p>You can then acquire ("paste") a file from the clipboard by calling {@link
176android.content.ClipboardManager#getPrimaryClip()} on the {@link
177android.content.ClipboardManager}. Handling the {@link android.content.ClipData} you receive can
178be more complicated and you need to be sure you can actually handle the data type.</p>
179
180<p>For more information, see the {@link android.content.ClipData} class reference. You can also see
181an example implementation of copy and paste in the <a
182href="{@docRoot}resources/samples/NotePad/index.html">NotePad</a> sample application.</p>
183
184
185
186
187<h3>Drag and drop</h3>
188
189<p>New APIs now facilitate the ability for your application to implement drag and drop
190functionality in the UI.</p>
191
Scott Maind41ff8e2011-01-21 14:51:33 -0800192<p>To begin dragging content in your activity, call {@link android.view.View#startDrag startDrag()}
193on a {@link android.view.View}, providing a {@link android.content.ClipData} object that represents
194the information to drag, a {@link android.view.View.DragShadowBuilder} to facilitate the "shadow"
195that the user sees while dragging, and an {@link java.lang.Object} that can share information about
196the drag object with views that may receive the object.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800197
198<p>To accept a drag object (receive the "drop") in a
199{@link android.view.View}, register the view with an {@link android.view.View.OnDragListener} by
200calling {@link android.view.View#setOnDragListener setOnDragListener()}. When a drag event occurs on
201the view, the system calls {@link android.view.View.OnDragListener#onDrag onDrag()} for the {@link
Scott Maind41ff8e2011-01-21 14:51:33 -0800202android.view.View.OnDragListener}, which receives a {@link android.view.DragEvent} describing the
203type of event has occurred (such as "drag started", "drag ended", and "drop"). During a drag
204operation, there is a stream of drag events, so the system calls {@link
205android.view.View.OnDragListener#onDrag onDrag()} repeatedly on the view. The receiving view can
206inquire the event type delivered to {@link android.view.View#onDragEvent onDragEvent()} by calling
207{@link android.view.DragEvent#getAction getAction()} on the {@link android.view.DragEvent}.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800208
Scott Maind41ff8e2011-01-21 14:51:33 -0800209<p>Although a drag event may carry a {@link android.content.ClipData} object, this is not related
210to the system clipboard. The data being dragged is passed as a {@link
211android.content.ClipData} object to {@link android.view.View#startDrag startDrag()} and the system
212sends it to the receiving {@link android.view.View} in the {@link android.view.DragEvent} sent to
213{@link android.view.View.OnDragListener#onDrag onDrag()}. A drag and drop operation should never
214put the dragged data in the global system clipboard.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800215
216
217
Scott Maind41ff8e2011-01-21 14:51:33 -0800218<h3>App widgets</h3>
Scott Main7fb538c2011-01-19 21:11:50 -0800219
220<p>App widgets can now be more interactive with scrolling list views, grid views, view flippers, and
221a new 3D stack widget.</p>
222
Scott Maind41ff8e2011-01-21 14:51:33 -0800223<p>Android 3.0 supports several new widget classes for app widgets, including: {@link
224android.widget.GridView}, {@link android.widget.ListView}, {@link android.widget.StackView}, {@link
225android.widget.ViewFlipper}, and {@link android.widget.AdapterViewFlipper}.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800226
227<p>You can use the new {@link android.widget.RemoteViewsService} to populate the new remote
228collection views ({@link android.widget.GridView}, {@link android.widget.ListView}, and {@link
229android.widget.StackView}).</p>
230
Scott Maind41ff8e2011-01-21 14:51:33 -0800231<p>{@link android.appwidget.AppWidgetProviderInfo} also supports two new fields: {@link
232android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} and {@link
233android.appwidget.AppWidgetProviderInfo#previewImage}. The {@link
Scott Main7fb538c2011-01-19 21:11:50 -0800234android.appwidget.AppWidgetProviderInfo#autoAdvanceViewId} field lets you specify the view ID of the
235app widget subview, which is auto-advanced by the app widget’s host. The
236{@link android.appwidget.AppWidgetProviderInfo#previewImage} field specifies a preview of what the
237App Widget looks like and is shown to the user from the widget picker. If this field is not
238supplied, the app widget's icon is used for the preview.</p>
239
Scott Maind41ff8e2011-01-21 14:51:33 -0800240<p>Android also provides a new widget preview tool (WidgetPreview), located in the SDK tools, to
241take a screenshot of your app widget, which you can use when specifying the {@link
242android.appwidget.AppWidgetProviderInfo#previewImage} field.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800243
244
245
246
247
Scott Maind41ff8e2011-01-21 14:51:33 -0800248<h3>Status bar notifications</h3>
Scott Main7fb538c2011-01-19 21:11:50 -0800249
250<p>The {@link android.app.Notification} APIs have been extended to support more content-rich status
251bar notifications, plus a new {@link android.app.Notification.Builder} class allows you to easily
252control the notification properties. New features include:</p>
253<ul>
254 <li>Support for a large icon in the notification. This is usually for
255social applications to show the contact photo of the person who is the source of the
256notification or for media apps to show an album thumbnail. Set using {@link
257android.app.Notification.Builder#setLargeIcon setLargeIcon()}.</li>
258 <li>Support for custom layouts in the status bar ticker, using {@link
259android.app.Notification.Builder#setTicker(CharSequence,RemoteViews) setTicker()}.</li>
260 <li>Support for custom notification layouts to include buttons with {@link
261android.app.PendingIntent}s, for more interactive notification widgets
262(such as to control ongoing music in the background).</li>
263</ul>
264
265
266
267
Scott Maind41ff8e2011-01-21 14:51:33 -0800268<h3>Content loaders</h3>
Scott Main7fb538c2011-01-19 21:11:50 -0800269
Scott Maind41ff8e2011-01-21 14:51:33 -0800270<p>New framework APIs facilitate asynchronous loading of data using the {@link
271android.content.Loader} class. You can use it in combination with UI components such as views and
272fragments to dynamically load data from background threads. The {@link
273android.content.CursorLoader} subclass is specially designed to help do so for data queried from
274a {@link android.content.ContentResolver}.</p>
275
276
277
278
279
280<h3>Bluetooth A2DP and headset APIs</h3>
281
282<p>Android now includes APIs for applications to verify the state of connected Bluetooth A2DP and
283headset profile devices. You can initialize the respective {@link
284android.bluetooth.BluetoothProfile} by calling {@link
285android.bluetooth.BluetoothAdapter#getProfileProxy getProfileProxy()} with either the {@link
286android.bluetooth.BluetoothProfile#A2DP} or {@link android.bluetooth.BluetoothProfile#HEADSET}
287profile constant and a {@link android.bluetooth.BluetoothProfile.ServiceListener} to receive
288callbacks when the client is connected or disconnected.</p>
289
290
291
292
293<h3>Animation framework</h3>
294
295<p>An all new flexible animation framework allows you to animate the properties of any object
Scott Main7fb538c2011-01-19 21:11:50 -0800296(View, Drawable, Fragment, Object, anything). It allows you to define many aspects of an animation,
297such as:</p>
298<ul>
299 <li>Duration</li>
300 <li>Repeat amount and behavior</li>
301 <li>Type of time interpolation</li>
302 <li>Animator sets to play animations together, sequentially, or after specified delays</li>
303 <li>Frame refresh delay</li>
304</ul>
305
306 <p>You can define these animation aspects, and others, for an object's int, float, and hexadecimal
307color values, by default. To animate any other type of value, you tell the system how to calculate
308the values for that given type, by implementing the {@link android.animation.TypeEvaluator}
309interface.</p>
310
311<p>There are two animators that you can use to animate values of a property: {@link
312android.animation.ValueAnimator} and {@link android.animation.ObjectAnimator}. The {@link
313android.animation.ValueAnimator} computes the animation values, but is not aware of the specific
314object or property that is animated as a result. It simply performs the calculations, and you must
315listen for the updates and process the data with your own logic. The {@link
316android.animation.ObjectAnimator} is a subclass of {@link android.animation.ValueAnimator} and
Scott Maind41ff8e2011-01-21 14:51:33 -0800317allows you to set the object and property to animate, and it handles all animation work.
318That is, you give the {@link android.animation.ObjectAnimator} the object to animate, the
319property of the object to change over time, and a set of values to apply to the property over
320time in order to animate it, then start the animation.</p>
321
322<p>Additionally, the {@link android.animation.LayoutTransition} class enables automatic transition
323animations for changes you make to your activity layout. To enable transitions for a {@link
324android.view.ViewGroup}, create a {@link android.animation.LayoutTransition} object and set it on
325any {@link android.view.ViewGroup} by calling {@link
326android.view.ViewGroup#setLayoutTransition setLayoutTransition()}. This causes default
327animations to run whenever items are added to or removed from the group. To specify custom
328animations, call {@link android.animation.LayoutTransition#setAnimator setAnimator()} on the {@link
329android.animation.LayoutTransition} to provide a custom {@link android.animation.Animator},
330such as a {@link android.animation.ValueAnimator} or {@link android.animation.ObjectAnimator}
331discussed above.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800332
333<p>For more information, see the <a
334href="{@docRoot}guide/topics/graphics/animation.html">Animation</a> developer guide.</p>
335
336
337
338
Scott Maind41ff8e2011-01-21 14:51:33 -0800339<h3>Extended UI framework</h3>
Scott Main7fb538c2011-01-19 21:11:50 -0800340
341<ul>
342
Scott Maind41ff8e2011-01-21 14:51:33 -0800343 <li><b>Multiple-choice selection for ListView and GridView</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800344
Scott Maind41ff8e2011-01-21 14:51:33 -0800345<p>New {@link android.widget.AbsListView#CHOICE_MODE_MULTIPLE_MODAL} mode for {@link
346android.widget.AbsListView#setChoiceMode setChoiceMode()} allows for selecting multiple items
347from a {@link android.widget.ListView} and {@link android.widget.GridView}.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800348
Scott Maind41ff8e2011-01-21 14:51:33 -0800349<p>To enable multiple-choice selection, call {@link
350android.widget.AbsListView#setChoiceMode setChoiceMode(CHOICE_MODE_MULTIPLE_MODAL)} and register a
351{@link android.widget.AbsListView.MultiChoiceModeListener MultiChoiceModeListener} with {@link
352android.widget.AbsListView#setMultiChoiceModeListener setMultiChoiceModeListener()}.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800353
Scott Maind41ff8e2011-01-21 14:51:33 -0800354<p>When the user performs a long-press on an item, the Action Bar switches to the Multi-choice
355Action Mode. The system notifies the {@link android.widget.AbsListView.MultiChoiceModeListener
356MultiChoiceModeListener} when items are selected by calling {@link
357android.widget.AbsListView.MultiChoiceModeListener#onItemCheckedStateChanged
358onItemCheckedStateChanged()}.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800359
Scott Maind41ff8e2011-01-21 14:51:33 -0800360<p>For an example of multiple-choice selection, see the <a
361href="{@docRoot}resources/samples/ApiDemos/src/com/example/android/apis/view/List15.html">List15.
362java</a>
363class in the API Demos sample application.</p>
364 </li>
Scott Main7fb538c2011-01-19 21:11:50 -0800365
Scott Maind41ff8e2011-01-21 14:51:33 -0800366
367 <li><b>New APIs to transform views</b>
368
369 <p>New APIs allow you to easily apply 2D and 3D transformations to {@link
370android.view.View}s in your activity layout, using a set of object properties that define the view's
371layout position, orientation, transparency and more.</p>
372 <p>New methods to set properties include: {@link android.view.View#setAlpha setAlpha()}, {@link
373android.view.View#setBottom setBottom()}, {@link android.view.View#setLeft setLeft()}, {@link
374android.view.View#setRight setRight()}, {@link android.view.View#setBottom setBottom()}, {@link
375android.view.View#setPivotX setPivotX()}, {@link android.view.View#setPivotY setPivotY()}, {@link
376android.view.View#setRotationX setRotationX()}, {@link android.view.View#setRotationY
377setRotationY()}, {@link android.view.View#setScaleX setScaleX()}, {@link android.view.View#setScaleY
378setScaleY()}, {@link android.view.View#setAlpha setAlpha()}, and others.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800379
Scott Maind41ff8e2011-01-21 14:51:33 -0800380 <p>Some methods also have a corresponding XML attribute that you can specify in your layout
381file. Available attributes include: {@code translationX}, {@code translationY}, {@code rotation},
382{@code rotationX}, {@code rotationY}, {@code scaleX}, {@code scaleY}, {@code transformPivotX},
383{@code transformPivotY}, and {@code alpha}.</p>
Scott Main7fb538c2011-01-19 21:11:50 -0800384
Scott Maind41ff8e2011-01-21 14:51:33 -0800385 <p>Using some of these new properties in combination with the new animation framework (discussed
386previously), you can easily create some fancy animations to your views. For example, to rotate a
387view on its y-axis, supply {@link android.animation.ObjectAnimator} with the {@link
388android.view.View}, the "rotationY" property, and the values to use:</p>
389<pre>
390ObjectAnimator animator = ObjectAnimator.ofFloat(myView, "rotationY", 0, 360);
391animator.setDuration(2000);
392animator.start();
393</pre>
394 </li>
Scott Main7fb538c2011-01-19 21:11:50 -0800395
Scott Maind41ff8e2011-01-21 14:51:33 -0800396
397 <li><b>New holographic themes</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800398
Scott Maind41ff8e2011-01-21 14:51:33 -0800399 <p>The standard system widgets and overall look have been redesigned for use on larger screens
Scott Main7fb538c2011-01-19 21:11:50 -0800400such as tablets and incorporate the new holographic UI theme. These style changes are applied
401using the standard <a href="{@docRoot}guide/topics/ui/themes.html">style and theme</a> system.
402Any application that targets the Android 3.0 platform inherit the holographic theme by default.
403However, if your application also applies its own styles, then it will override the holographic
404theme, unless you update your styles to inherit them.</p>
405
406<p>To apply the holographic theme to individual activities or to inherit them in your own theme
407definitions, you can use one of several new {@link android.R.style#Theme_Holo Theme.Holo}
408themes.</p>
Scott Maind41ff8e2011-01-21 14:51:33 -0800409 </li>
410
411
412 <li><b>New widgets</b>
413
414 <ul>
415 <li>{@link android.widget.AdapterViewAnimator}
416 <p>Base class for an {@link android.widget.AdapterView} that performs animations when switching
417 between its views.</p></li>
418
419 <li>{@link android.widget.AdapterViewFlipper}
420 <p>Simple {@link android.widget.ViewAnimator} that animates between two or more views that have
421 been added to it. Only one child is shown at a time. If requested, it can automatically flip
422 between
423 each child at a regular interval.</p></li>
424
425 <li>{@link android.widget.CalendarView}
426 <p>Allows users to select dates from a calendar and you can configure the range of dates
427 available. A user can select a date by tapping on it and can scroll and fling
428 the calendar to a desired date.</p></li>
429
430 <li>{@link android.widget.ListPopupWindow}
431 <p>Anchors itself to a host view and displays a list of choices, such as for a list of
432 suggestions when typing into an {@link android.widget.EditText} view.</p></li>
433
434 <li>{@link android.widget.NumberPicker}
435 <p>Enables the user to select a number from a predefined range. The widget presents an
436 input field and up and down buttons for selecting a number. Touching the input field shows a
437 scroll wheel that allows the user to scroll through values or touch again to directly edit the
438 current value. It also allows you to map from positions to strings, so that
439 the corresponding string is displayed instead of the position index.</p></li>
440
441 <li>{@link android.widget.PopupMenu}
442 <p>Displays a {@link android.view.Menu} in a modal popup window that's anchored to a view. The
443 popup
444 appears below the anchor view if there is room, or above it if there is not. If the IME (soft
445 keyboard) is visible, the popup does not overlap it until it is touched.</p></li>
446
447 <li>{@link android.widget.SearchView}
448 <p>Provides a search box that works in conjunction with a search provider (in the same manner as
449 the traditional <a href="{@docRoot}guide/topics/search/search-dialog.html">search dialog</a>).
450It
451 also displays recent query suggestions or custom suggestions as configured by the search
452 provider. This widget is particularly useful for offering search in the Action Bar.</p></li>
453
454 <li>{@link android.widget.StackView}
455 <p>A view that displays its children in a 3D stack and allows users to discretely swipe through
456 the
457 children.</p></li>
458
459 </ul>
460 </li>
461
462</ul>
Scott Main7fb538c2011-01-19 21:11:50 -0800463
464
465
Scott Main7fb538c2011-01-19 21:11:50 -0800466
467<!--
468<h3>WebKit</h3>
469<h3>JSON (utilities)</h3>
470 -->
471
472
473<h3>Graphics</h3>
474
475<ul>
Scott Maind41ff8e2011-01-21 14:51:33 -0800476 <li><b>Hardware accelerated 2D graphics</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800477
478<p>You can now enable the OpenGL renderer for your application by setting {@code
479android:hardwareAccelerated="true"} in your manifest element's <a
480href="{@docRoot}guide/topics/manifest/application-element.html">{@code &lt;application&gt;}</a>
481element or for individual <a
482href="{@docRoot}guide/topics/manifest/activity-element.html">{@code &lt;activity&gt;}</a>
483elements.</p>
484
485<p>This flag helps applications by making them draw faster. This results in smoother animations,
486smoother scrolling, and overall better performance and response to user interaction.</p></li>
487
Scott Maind41ff8e2011-01-21 14:51:33 -0800488
489 <li><b>View support for hardware and software layers</b>
490
491 <p>By default, a {@link android.view.View} has no layer specified. You can specify that the
492view be backed by either a hardware or software layer, specified by values {@link
493android.view.View#LAYER_TYPE_HARDWARE} and {@link android.view.View#LAYER_TYPE_SOFTWARE}, using
494{@link android.view.View#setLayerType setLayerType()} or the <a
495href="{@docRoot}reference/android/view/View.html#attr_android:layerType">{@code layerType}</a>
496attribute.</p>
497 <p>A hardware layer is backed by a hardware specific texture (generally Frame Buffer Objects or
498FBO on OpenGL hardware) and causes the view to be rendered using Android's hardware rendering
499pipeline, but only if hardware acceleration is turned on for the view hierarchy. When hardware
500acceleration is turned off, hardware layers behave exactly as software layers.</p>
501 <p>A software layer is backed by a bitmap and causes the view to be rendered using Android's
502software rendering pipeline, even if hardware acceleration is enabled. Software layers should be
503avoided when the affected view tree updates often. Every update will require to re-render the
504software layer, which can potentially be slow.</p>
505 <p>For more information, see the {@link android.view.View#LAYER_TYPE_HARDWARE} and {@link
506android.view.View#LAYER_TYPE_SOFTWARE} documentation.</p>
507 </li>
508
509
510 <li><b>Renderscript 3D graphics engine</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800511
512<p>Renderscript is a runtime 3D framework that provides both an API for building 3D scenes as well
513as a special, platform-independent shader language for maximum performance. Using Renderscript, you
514can accelerate graphics operations and data processing. Renderscript is an ideal way to create
515high-performance 3D effects for applications, wallpapers, carousels, and more.</p></li>
516</ul>
517
518
519
520
Scott Main7fb538c2011-01-19 21:11:50 -0800521<h3>Media</h3>
522
523
524<ul>
Scott Maind41ff8e2011-01-21 14:51:33 -0800525 <li><b>Camcorder profiles</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800526
527<p>New {@link android.media.CamcorderProfile#hasProfile hasProfile()} method and several video
528quality profiles, such as {@link android.media.CamcorderProfile#QUALITY_1080P}, {@link
529android.media.CamcorderProfile#QUALITY_720P}, {@link
530android.media.CamcorderProfile#QUALITY_CIF}, and more, to determine the camcorder quality
531profiles.</p></li>
532
Scott Maind41ff8e2011-01-21 14:51:33 -0800533 <li><b>Time lapse video mode</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800534
535<p>Camcorder APIs now support the ability to record time lapse video. The {@link
536android.media.MediaRecorder#setCaptureRate setCaptureRate()} sets the rate at which frames
537should be captured.</p></li>
538
Scott Maind41ff8e2011-01-21 14:51:33 -0800539 <li><b>Digital media file transfer</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800540
541<p>The platform includes built-in support for Media/Picture Transfer Protocol (MTP/PTP) over USB,
542which lets users easily transfer any type of media files between devices and to a host computer.
543Developers can build on this support, creating applications that let users create or manage rich
544media files that they may want to transfer or share across devices. </p></li>
545
Scott Maind41ff8e2011-01-21 14:51:33 -0800546 <li><b>Digital rights management (DRM)</b>
Scott Main7fb538c2011-01-19 21:11:50 -0800547
548<p>New extensible digital rights management (DRM) framework for checking and enforcing digital
549rights. It's implemented in two architectural layers:</p>
550<ul>
551 <li>A DRM framework API, which is exposed to applications and runs through the Dalvik VM for
552standard applications.</li>
553 <li>A native code DRM manager that implements the framework API and exposes an interface for DRM
554plug-ins to handle rights management and decryption for various DRM schemes.</li>
555</ul>
556
557<p>For application developers, the framework offers an abstract, unified API that simplifies the
558management of protected content. The API hides the complexity of DRM operations and allows a
559consistent operation mode for both protected and unprotected content, and across a variety of DRM
560schemes.</p>
561
562<p>For device manufacturers, content owners, and Internet digital media providers the DRM
563framework?s plugin API provides a means of adding support for a DRM scheme of choice into the
564Android system, for secure enforcement of content protection.</p>
565
566<p>The preview release does not provide any native DRM plug-ins for checking and enforcing digital
567rights. However, device manufacturers may ship DRM plug-ins with their devices.</p>
568
569<p>You can find all of the DRM APIs in the {@link android.drm} package.</p></li>
570
571</ul>
572
573
574
575
576
577
578
579
580<h2 id="api-level">API Level</h2>
581
582<p>The Android 3.0 platform delivers an updated version of
583the framework API. Because this is a preview of the Android 3.0 API, it uses a provisional API
584level of "Honeycomb", instead of an integer identifier, which will be provided when the final SDK
585is made available and all APIs are final.</p>
586
587<p>To use APIs introduced in Android 3.0 in your application, you need compile the application
588against the Android library that is provided in the Android 3.0 preview SDK platform and you must
589declare this API Level in your manifest as <code>android:minSdkVersion="Honeycomb"</code>, in the
590<code>&lt;uses-sdk&gt;</code> element in the application's manifest.</p>
591
592<p>For more information about using this provisional API Level and setting up your environment
593to use the preview SDK, please see the <a href="{@docRoot}sdk/preview/start.html">Getting
594Started</a> document.</p>
595
596
597
598
599<h2 id="apps">Built-in Applications</h2>
600
601<p>The system image included in the downloadable platform provides these
602built-in applications:</p>
603
604<table style="border:0;padding-bottom:0;margin-bottom:0;">
605<tr>
606<td style="border:0;padding-bottom:0;margin-bottom:0;">
607<ul>
608<li>Browser</li>
609<li>Calculator</li>
610<li>Camera</li>
611<li>Clock</li>
612<li>Contacts</li>
613<li>Custom Locale</li>
614<li>Dev Tools</li>
615<li>Downloads</li>
616<li>Email</li>
617</ul>
618</td>
619<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
620<ul>
621<li>Gallery</li>
622<li>Music</li>
623<li>Search</li>
624<li>Settings</li>
625<li>Spare Parts (developer app)</li>
626<li>Speech Recorder</li>
627</ul>
628</td>
629</tr>
630</table>
631
632
633<h2 id="locs" style="margin-top:.75em;">Locales</h2>
634
635<p>The system image included in the downloadable SDK platform provides a variety of
636built-in locales. In some cases, region-specific strings are available for the
637locales. In other cases, a default version of the language is used. The
638languages that are available in the Android 3.0 system
639image are listed below (with <em>language</em>_<em>country/region</em> locale
640descriptor).</p>
641
642<table style="border:0;padding-bottom:0;margin-bottom:0;">
643<tr>
644<td style="border:0;padding-bottom:0;margin-bottom:0;">
645<ul>
646<li>Arabic, Egypt (ar_EG)</li>
647<li>Arabic, Israel (ar_IL)</li>
648<li>Bulgarian, Bulgaria (bg_BG)</li>
649<li>Catalan, Spain (ca_ES)</li>
650<li>Czech, Czech Republic (cs_CZ)</li>
651<li>Danish, Denmark(da_DK)</li>
652<li>German, Austria (de_AT)</li>
653<li>German, Switzerland (de_CH)</li>
654<li>German, Germany (de_DE)</li>
655<li>German, Liechtenstein (de_LI)</li>
656<li>Greek, Greece (el_GR)</li>
657<li>English, Australia (en_AU)</li>
658<li>English, Canada (en_CA)</li>
659<li>English, Britain (en_GB)</li>
660<li>English, Ireland (en_IE)</li>
661<li>English, India (en_IN)</li>
662<li>English, New Zealand (en_NZ)</li>
663<li>English, Singapore(en_SG)</li>
664<li>English, US (en_US)</li>
665<li>English, Zimbabwe (en_ZA)</li>
666<li>Spanish (es_ES)</li>
667<li>Spanish, US (es_US)</li>
668<li>Finnish, Finland (fi_FI)</li>
669<li>French, Belgium (fr_BE)</li>
670<li>French, Canada (fr_CA)</li>
671<li>French, Switzerland (fr_CH)</li>
672<li>French, France (fr_FR)</li>
673<li>Hebrew, Israel (he_IL)</li>
674<li>Hindi, India (hi_IN)</li>
675</ul>
676</td>
677<td style="border:0;padding-bottom:0;margin-bottom:0;padding-left:5em;">
678<li>Croatian, Croatia (hr_HR)</li>
679<li>Hungarian, Hungary (hu_HU)</li>
680<li>Indonesian, Indonesia (id_ID)</li>
681<li>Italian, Switzerland (it_CH)</li>
682<li>Italian, Italy (it_IT)</li>
683<li>Japanese (ja_JP)</li>
684<li>Korean (ko_KR)</li>
685<li>Lithuanian, Lithuania (lt_LT)</li>
686<li>Latvian, Latvia (lv_LV)</li>
687<li>Norwegian bokmål, Norway (nb_NO)</li>
688<li>Dutch, Belgium (nl_BE)</li>
689<li>Dutch, Netherlands (nl_NL)</li>
690<li>Polish (pl_PL)</li>
691<li>Portuguese, Brazil (pt_BR)</li>
692<li>Portuguese, Portugal (pt_PT)</li>
693<li>Romanian, Romania (ro_RO)</li>
694<li>Russian (ru_RU)</li></li>
695<li>Slovak, Slovakia (sk_SK)</li>
696<li>Slovenian, Slovenia (sl_SI)</li>
697<li>Serbian (sr_RS)</li>
698<li>Swedish, Sweden (sv_SE)</li>
699<li>Thai, Thailand (th_TH)</li>
700<li>Tagalog, Philippines (tl_PH)</li>
701<li>Turkish, Turkey (tr_TR)</li>
702<li>Ukrainian, Ukraine (uk_UA)</li>
703<li>Vietnamese, Vietnam (vi_VN)</li>
704<li>Chinese, PRC (zh_CN)</li>
705<li>Chinese, Taiwan (zh_TW)</li>
706</td>
707</tr>
708</table>
709
710<p class="note"><strong>Note:</strong> The Android platform may support more
711locales than are included in the SDK system image. All of the supported locales
712are available in the <a href="http://source.android.com/">Android Open Source
713Project</a>.</p>
714
715<h2 id="skins">Emulator Skins</h2>
716
717<p>The downloadable platform includes the following emulator skin:</p>
718
719<ul>
720 <li>
721 WXGA (1280x800, medium density, xlarge screen)
722 </li>
723</ul>
724
725<p>For more information about how to develop an application that displays
726and functions properly on all Android-powered devices, see <a
727href="{@docRoot}guide/practices/screens_support.html">Supporting Multiple
728Screens</a>.</p>