• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1page.title=What's New
2
3@jd:body
4
5<p>The following code samples were recently published for the L Developer Preview. You can
6download them in the Android SDK Manager under the <b>SDK Samples</b> component
7for the L Developer Preview.</p>
8
9<p class="note">
10  <strong>Note:</strong> At this time, the downloadable projects are designed
11   for use with Gradle and Android Studio.
12</p>
13
14
15<h3 id="BasicManagedProfile">BasicManagedProfile</h3>
16<div class="figure" style="width:220px">
17  <img src="{@docRoot}samples/images/BasicManagedProfile.png"
18     srcset="{@docRoot}samples/images/BasicManagedProfile@2x.png 2x"
19     alt="" height="375" />
20  <p class="img-caption">
21    <strong>Figure 1.</strong> The BasicManagedProfile sample app.
22  </p>
23</div>
24
25<p>This sample demonstrates how to create a managed profile. You can also:</p>
26<ul>
27  <li>Enable or disable other apps, and set restrictions on them.</li>
28  <li>Configure intents to be forwarded between the primary account and the
29   managed profile.</li>
30  <li>Wipe all the data associated with the managed profile.</li>
31</ul>
32
33<p class="note"><strong>Note:</strong> There can be only one managed profile on
34  a device at a time.</p>
35
36<p><a href="http://github.com/googlesamples/android-BasicManagedProfile">Get it on GitHub</a></p>
37
38<h3 id="Camera2Basic">Camera2Basic</h3>
39
40<!--
41<div class="figure" style="width:220px">
42  <img src="" srcset="@2x.png 2x" alt="" height="375" />
43  <p class="img-caption">
44    <strong>Figure n.</strong> Single sentence summarizing the figure.
45  </p>
46</div>
47-->
48
49<p>This sample demonstrates the basic use of the Camera2 API. The sample code
50demonstrates how you can display camera preview and take pictures.</p>
51
52<p><a href="http://github.com/googlesamples/android-Camera2Basic">Get it on GitHub</a></p>
53
54
55<h3 id="Camera2Video">Camera2Video</h3>
56<!--
57<div class="figure" style="width:220px">
58<img src="" srcset="@2x.png 2x" alt="" height="375" />
59    <p class="img-caption">
60    <strong>Figure n.</strong> Single sentence summarizing the figure.
61  </p>
62</div>
63-->
64
65<p>This sample demonstrates how to record video using the Camera2 API.</p>
66
67<p><a href="http://github.com/googlesamples/android-Camera2Video">Get it on GitHub</a></p>
68
69<h3 id="ActivitySceneTransitionBasic">ActivitySceneTransitionBasic</h3>
70<div class="figure" style="width:220px">
71  <img src="{@docRoot}samples/images/ActivitySceneTransitionBasic.png"
72      srcset="{@docRoot}samples/images/ActivitySceneTransitionBasic@2x.png 2x"
73      alt="" height="375" />
74  <p class="img-caption">
75    <strong>Figure 2.</strong> The ActivitySceneTransitionBasic sample app.
76  </p>
77  </div>
78
79<p> This sample demonstrates how to the use {@link android.app.Activity} scene
80transitions when transitioning from one activity to another. Uses a combination
81of <code>moveImage</code> and <code>changeBounds</code> to nicely transition
82from a grid of images to an activity with a large image and detail text. </p>
83
84<p><a href="http://github.com/googlesamples/android-ActivitySceneTransition">Get it on GitHub</a></p>
85
86<h3 id="ElevationBasic">ElevationBasic</h3>
87<!--
88<div class="figure" style="width:220px">
89<img src="" srcset="@2x.png 2x" alt="" height="375" />
90    <p class="img-caption">
91    <strong>Figure n.</strong> Single sentence summarizing the figure.
92  </p>
93</div>
94-->
95
96<p>
97This sample demonstrates two alternative ways to move a view in the z-axis:</p>
98
99<ul>
100  <li>With a fixed elevation, using XML.</li>
101  <li>Raising the elevation when the user taps on it, using
102      <code>setTranslationZ()</code>.</li>
103</ul>
104
105<p><a href="http://github.com/googlesamples/android-ElevationBasic">Get it on GitHub</a></p>
106
107<h3 id="ElevationDrag">ElevationDrag</h3>
108<!--
109<div class="figure" style="width:220px">
110  <img src="" srcset="@2x.png 2x" alt="" height="375" />
111  <p class="img-caption">
112    <strong>Figure n.</strong> Single sentence summarizing the figure.
113  </p>
114</div>
115-->
116
117<p>This sample demonstrates a drag and drop action on different shapes.
118Elevation and z-translation are used to render the shadows. The views are
119clipped using different outlines.</p>
120
121<p><a href="http://github.com/googlesamples/android-ElevationDrag">Get it on GitHub</a></p>
122
123
124<h3 id="ClippingBasic">ClippingBasic</h3>
125<!--
126<div class="figure" style="width:220px">
127  <img src="" srcset="@2x.png 2x" alt="" height="375" />
128  <p class="img-caption">
129    <strong>Figure n.</strong> Single sentence summarizing the figure.
130  </p>
131</div>
132-->
133
134<p>
135This sample demonstrates clipping on a {@link android.view.View}.
136</p>
137
138<p><a href="http://github.com/googlesamples/android-ClippingBasic">Get it on GitHub</a></p>
139
140<div class="figure" style="width:220px">
141  <img src="{@docRoot}samples/images/JobSchedulerSample.png"
142      srcset="{@docRoot}samples/images/JobSchedulerSample@2x.png 2x"
143      alt="" height="375" />
144  <p class="img-caption">
145    <strong>Figure 3.</strong> The JobSchedulerSample sample app.
146  </p>
147</div>
148
149<h3 id="GameControllerSample">GameControllerSample</h3>
150<!--
151<div class="figure" style="width:220px">
152  <img src="" srcset="@2x.png 2x" alt="" height="375" />
153  <p class="img-caption">
154    <strong>Figure n.</strong> Single sentence summarizing the figure.
155  </p>
156</div>
157-->
158
159<p>
160This sample implements a multi-player game, demonstrating game controller input
161handling.
162</p>
163
164<p><a href="http://github.com/googlesamples/androidtv-GameController">Get it on GitHub</a></p>
165
166
167<h3 id="Visual-Game-Controller">Visual-Game-Controller</h3>
168<!--
169<div class="figure" style="width:220px">
170  <img src="" srcset="@2x.png 2x" alt="" height="375" />
171  <p class="img-caption">
172    <strong>Figure n.</strong> Single sentence summarizing the figure.
173  </p>
174</div>
175-->
176
177<p>
178This sample displays events received from a game controller shown on the screen.
179</p>
180
181<p><a href="http://github.com/googlesamples/androidtv-VisualGameController">Get it on GitHub</a></p>
182
183<h3 id="AndroidTVLeanbackSample">AndroidTVLeanbackSample</h3>
184<!--
185<div class="figure" style="width:220px">
186  <img src="" srcset="@2x.png 2x" alt="" height="375" />
187  <p class="img-caption">
188    <strong>Figure n.</strong> Single sentence summarizing the figure.
189  </p>
190</div>
191-->
192
193<p>
194This sample demonstrates use of the Android TV Leanback Support Library.
195</p>
196
197<p><a href="http://github.com/googlesamples/androidtv-Leanback">Get it on GitHub</a></p>
198
199<h3 id="JobSchedulerSample">JobSchedulerSample</h3>
200
201<p>
202This sample app allows the user to schedule jobs through the UI, and shows
203visual cues when the jobs are executed.
204</p>
205
206<p><a href="http://github.com/googlesamples/android-JobScheduler">Get it on GitHub</a></p>
207
208<h3 id="NavigationDrawerSample">NavigationDrawerSample</h3>
209<!--
210<div class="figure" style="width:220px">
211  <img src="" srcset="@2x.png 2x" alt="" height="375" />
212  <p class="img-caption">
213    <strong>Figure n.</strong> Single sentence summarizing the figure.
214  </p>
215</div>
216-->
217
218<p>
219This sample illustrates a common usage of the Android support library's
220{@link android.support.v4.widget.DrawerLayout} widget.
221</p>
222
223<p><a href="http://github.com/googlesamples/android-NavigationDrawer">Get it on GitHub</a></p>
224<!--
225<h3 id="">SampleName</h3>
226
227<div class="figure" style="width:220px">
228  <img src="" srcset="@2x.png 2x" alt="" height="375" />
229  <p class="img-caption">
230    <strong>Figure n.</strong> Single sentence summarizing the figure.
231  </p>
232</div>
233
234<p>
235**description**
236</p>
237-->
238
239<h3 id="FloatingActionButtonBasic">FloatingActionButtonBasic</h3>
240
241<p>
242This sample shows the two sizes of Floating Action Buttons and how to interact with
243them.
244</p>
245
246<p><a href="http://github.com/googlesamples/android-FloatingActionButtonBasic">Get it on GitHub</a></p>
247
248<h3 id="RevealEffectBasic">RevealEffectBasic</h3>
249
250<p>
251A sample demonstrating how to perform a reveal effect for UI elements within the Material Design framework.
252</p>
253
254<p><a href="http://github.com/googlesamples/android-RevealEffectBasic">Get it on GitHub</a></p>
255
256<h3 id="RecyclerView">RecyclerView</h3>
257
258<p>
259Demonstration of using RecyclerView with a LayoutManager to create a vertical ListView.
260</p>
261
262<p><a href="http://github.com/googlesamples/android-RecyclerView">Get it on GitHub</a></p>
263
264<h3 id="CardView">CardView</h3>
265
266<p>
267This sample demonstrates how to use the CardView UI widget introduced in Android 5.0, using the support library for backward compatibility.
268</p>
269
270<p><a href="http://github.com/googlesamples/android-CardView">Get it on GitHub</a></p>
271
272<h3 id="LNotifications">LNotifications</h3>
273
274<p>
275This sample demonstrates how new features for notifications introduced in Android 5.0
276are used such as Heads-Up notifications, visibility, people, category and priority
277metadata. </p>
278<p><a href="http://github.com/googlesamples/android-LNotifications">Get it on GitHub</a></p>
279
280<h3 id="DrawableTinting">DrawableTinting</h3>
281
282<p>Sample that shows applying tinting and color filters to Drawables both programmatically
283and as Drawable resources in XML.</p>
284<p>Tinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters.
285A color state list is referenced as the tint color, which defines colors for different
286states of a View (for example disabled/enabled, focused, pressed or selected).</p>
287<p>Programmatically, tinting is applied to a Drawable through its "setColorFilter" method,
288with a reference to a color and a PorterDuff blend mode. The color and blend mode can be
289changed from the UI to see the effect of different options.</p>
290
291<p><a href="http://github.com/googlesamples/android-DrawableTinting">Get it on GitHub</a></p>
292
293<h3 id="Interpolator">Interpolator</h3>
294
295<p>
296This sample demonstrates the use of animation interpolators and path animations for
297Material Design. It shows how an ObjectAnimator is used to animate two properties of a
298view (scale X and Y) along a path.
299</p>
300
301<p><a href="http://github.com/googlesamples/android-Interpolator">Get it on GitHub</a></p>
302
303<h3 id="HdrViewfinder">HdrViewfinder</h3>
304
305<p>
306This demo implements a real-time high-dynamic-range camera viewfinder, by alternating
307the sensor's exposure time between two exposure values on even and odd frames, and then
308compositing together the latest two frames whenever a new frame is captured.
309</p>
310
311<p><a href="http://github.com/googlesamples/android-HdrViewfinder">Get it on GitHub</a></p>
312
313<h3 id="DocumentCentricApps">DocumentCentricApps</h3>
314
315<p>
316This sample shows the basic usage of the new "Document Centric Apps" API.
317It let's you create new documents in the system overview menu and persists its
318state through reboots. If "Task per document" is checked a new task will be
319created for every new document in the overview menu.
320</p>
321
322<p><a href="http://github.com/googlesamples/android-DocumentCentricApps">Get it on GitHub</a></p>
323
324<h3 id="DocumentCentricRelinquishIdentity">DocumentCentricRelinquishIdentity</h3>
325
326<p>
327This sample shows how to relinquish identity to activities above it in the task stack.
328</p>
329
330<p><a href="http://github.com/googlesamples/android-DocumentCentricRelinquishIdentity">Get it on GitHub</a></p>
331
332<h3 id="AppRestrictionEnforcer">AppRestrictionEnforcer</h3>
333
334<p>
335This sample demonstrates how to set restrictions to other apps as a profile owner.
336Use AppRestrictionSchema sample as a app with available restrictions.
337</p>
338
339<p><a href="http://github.com/googlesamples/android-AppRestrictionEnforcer">Get it on GitHub</a></p>
340
341<h3 id="AppRestrictionSchema">AppRestrictionSchema</h3>
342
343<p>
344This sample shows how to use app restrictions. This application has one boolean
345restriction with a key "can_say_hello" that defines whether the only feature of this
346app (press the button to show "Hello" message) is enabled or disabled. Use
347AppRestrictionEnforcer sample to toggle the restriction.
348</p>
349
350<p><a href="http://github.com/googlesamples/android-AppRestrictionSchema">Get it on GitHub</a></p>
351