blob: 155ae214ddd1c504c968e2bd334ac8614f11818e [file] [log] [blame]
Robert Lyd82b45c2014-06-16 14:02:04 -07001page.title=Samples
2
3@jd:body
4
Andrew Solovayfb7a2872014-06-24 15:35:09 -07005<p>The following code samples are provided for the L Developer Preview. You can
Robert Ly18ec4182014-06-24 21:17:45 -07006download them in the Android SDK Manager under the <b>SDK Samples</b> component
7for the L Developer Preview.</p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -07008
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
Andrew Solovayfb7a2872014-06-24 15:35:09 -070015<h3 id="BasicManagedProfile">BasicManagedProfile</h3>
16<div class="figure" style="width:220px">
17 <img src="{@docRoot}preview/images/BasicManagedProfile.png"
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -070018 srcset="{@docRoot}preview/images/BasicManagedProfile@2x.png 2x"
Andrew Solovayfb7a2872014-06-24 15:35:09 -070019 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
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -070036<p><a href="http://github.com/googlesamples/android-BasicManagedProfile">Get it on GitHub</a></p>
37
Andrew Solovayfb7a2872014-06-24 15:35:09 -070038<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
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -070052<p><a href="http://github.com/googlesamples/android-Camera2Basic">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -070053
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-->
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -070064
Andrew Solovayfb7a2872014-06-24 15:35:09 -070065<p>This sample demonstrates how to record video using the Camera2 API.</p>
66
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -070067<p><a href="http://github.com/googlesamples/android-Camera2Video">Get it on GitHub</a></p>
68
Andrew Solovayfb7a2872014-06-24 15:35:09 -070069<h3 id="ActivitySceneTransitionBasic">ActivitySceneTransitionBasic</h3>
70<div class="figure" style="width:220px">
71 <img src="{@docRoot}preview/images/ActivitySceneTransitionBasic.png"
72 srcset="{@docRoot}preview/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
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -070084<p><a href="http://github.com/googlesamples/android-ActivitySceneTransition">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -070085
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-->
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -070095
Andrew Solovayfb7a2872014-06-24 15:35:09 -070096<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
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700105<p><a href="http://github.com/googlesamples/android-ElevationBasic">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700106
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
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700121<p><a href="http://github.com/googlesamples/android-ElevationDrag">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700122
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-->
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700133
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700134<p>
135This sample demonstrates clipping on a {@link android.view.View}.
136</p>
137
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700138<p><a href="http://github.com/googlesamples/android-ClippingBasic">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700139
Robert Ly18ec4182014-06-24 21:17:45 -0700140<div class="figure" style="width:220px">
141 <img src="{@docRoot}preview/images/JobSchedulerSample.png"
142 srcset="{@docRoot}preview/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>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700148
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-->
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700158
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700159<p>
160This sample implements a multi-player game, demonstrating game controller input
161handling.
162</p>
163
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700164<p><a href="http://github.com/googlesamples/androidtv-GameController">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700165
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-->
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700176
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700177<p>
178This sample displays events received from a game controller shown on the screen.
179</p>
180
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700181<p><a href="http://github.com/googlesamples/androidtv-VisualGameController">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700182
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-->
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700192
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700193<p>
194This sample demonstrates use of the Android TV Leanback Support Library.
195</p>
196
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700197<p><a href="http://github.com/googlesamples/androidtv-Leanback">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700198
199<h3 id="JobSchedulerSample">JobSchedulerSample</h3>
200
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700201<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
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700206<p><a href="http://github.com/googlesamples/android-JobScheduler">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700207
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-->
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700217
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700218<p>
219This sample illustrates a common usage of the Android support library's
220{@link android.support.v4.widget.DrawerLayout} widget.
221</p>
222
Ricardo Cerveraa1bc3842014-06-25 17:14:03 -0700223<p><a href="http://github.com/googlesamples/android-NavigationDrawer">Get it on GitHub</a></p>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700224<!--
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-->