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