blob: e4e16744794ad22e8d0c6a49a65acc408e8fbbc1 [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"
18 srcset="{@docRoot}preview/images/hun-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<h3 id="Camera2Basic">Camera2Basic</h3>
37
38<!--
39<div class="figure" style="width:220px">
40 <img src="" srcset="@2x.png 2x" alt="" height="375" />
41 <p class="img-caption">
42 <strong>Figure n.</strong> Single sentence summarizing the figure.
43 </p>
44</div>
45-->
46
47<p>This sample demonstrates the basic use of the Camera2 API. The sample code
48demonstrates how you can display camera preview and take pictures.</p>
49
50
51
52<h3 id="Camera2Video">Camera2Video</h3>
53<!--
54<div class="figure" style="width:220px">
55<img src="" srcset="@2x.png 2x" alt="" height="375" />
56 <p class="img-caption">
57 <strong>Figure n.</strong> Single sentence summarizing the figure.
58 </p>
59</div>
60-->
61<p>This sample demonstrates how to record video using the Camera2 API.</p>
62
Andrew Solovayfb7a2872014-06-24 15:35:09 -070063<h3 id="ActivitySceneTransitionBasic">ActivitySceneTransitionBasic</h3>
64<div class="figure" style="width:220px">
65 <img src="{@docRoot}preview/images/ActivitySceneTransitionBasic.png"
66 srcset="{@docRoot}preview/images/ActivitySceneTransitionBasic@2x.png 2x"
67 alt="" height="375" />
68 <p class="img-caption">
69 <strong>Figure 2.</strong> The ActivitySceneTransitionBasic sample app.
70 </p>
71 </div>
72
73<p> This sample demonstrates how to the use {@link android.app.Activity} scene
74transitions when transitioning from one activity to another. Uses a combination
75of <code>moveImage</code> and <code>changeBounds</code> to nicely transition
76from a grid of images to an activity with a large image and detail text. </p>
77
78
79<h3 id="ElevationBasic">ElevationBasic</h3>
80<!--
81<div class="figure" style="width:220px">
82<img src="" srcset="@2x.png 2x" alt="" height="375" />
83 <p class="img-caption">
84 <strong>Figure n.</strong> Single sentence summarizing the figure.
85 </p>
86</div>
87-->
88<p>
89This sample demonstrates two alternative ways to move a view in the z-axis:</p>
90
91<ul>
92 <li>With a fixed elevation, using XML.</li>
93 <li>Raising the elevation when the user taps on it, using
94 <code>setTranslationZ()</code>.</li>
95</ul>
96
97
98
99<h3 id="ElevationDrag">ElevationDrag</h3>
100<!--
101<div class="figure" style="width:220px">
102 <img src="" srcset="@2x.png 2x" alt="" height="375" />
103 <p class="img-caption">
104 <strong>Figure n.</strong> Single sentence summarizing the figure.
105 </p>
106</div>
107-->
108
109<p>This sample demonstrates a drag and drop action on different shapes.
110Elevation and z-translation are used to render the shadows. The views are
111clipped using different outlines.</p>
112
113
114
115<h3 id="ClippingBasic">ClippingBasic</h3>
116<!--
117<div class="figure" style="width:220px">
118 <img src="" srcset="@2x.png 2x" alt="" height="375" />
119 <p class="img-caption">
120 <strong>Figure n.</strong> Single sentence summarizing the figure.
121 </p>
122</div>
123-->
124<p>
125This sample demonstrates clipping on a {@link android.view.View}.
126</p>
127
128
Robert Ly18ec4182014-06-24 21:17:45 -0700129<div class="figure" style="width:220px">
130 <img src="{@docRoot}preview/images/JobSchedulerSample.png"
131 srcset="{@docRoot}preview/images/JobSchedulerSample@2x.png 2x"
132 alt="" height="375" />
133 <p class="img-caption">
134 <strong>Figure 3.</strong> The JobSchedulerSample sample app.
135 </p>
136</div>
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700137
138<h3 id="GameControllerSample">GameControllerSample</h3>
139<!--
140<div class="figure" style="width:220px">
141 <img src="" srcset="@2x.png 2x" alt="" height="375" />
142 <p class="img-caption">
143 <strong>Figure n.</strong> Single sentence summarizing the figure.
144 </p>
145</div>
146-->
147<p>
148This sample implements a multi-player game, demonstrating game controller input
149handling.
150</p>
151
152
153
154<h3 id="Visual-Game-Controller">Visual-Game-Controller</h3>
155<!--
156<div class="figure" style="width:220px">
157 <img src="" srcset="@2x.png 2x" alt="" height="375" />
158 <p class="img-caption">
159 <strong>Figure n.</strong> Single sentence summarizing the figure.
160 </p>
161</div>
162-->
163<p>
164This sample displays events received from a game controller shown on the screen.
165</p>
166
167
168
169<h3 id="AndroidTVLeanbackSample">AndroidTVLeanbackSample</h3>
170<!--
171<div class="figure" style="width:220px">
172 <img src="" srcset="@2x.png 2x" alt="" height="375" />
173 <p class="img-caption">
174 <strong>Figure n.</strong> Single sentence summarizing the figure.
175 </p>
176</div>
177-->
178<p>
179This sample demonstrates use of the Android TV Leanback Support Library.
180</p>
181
182
183
184<h3 id="JobSchedulerSample">JobSchedulerSample</h3>
185
Andrew Solovayfb7a2872014-06-24 15:35:09 -0700186
187<p>
188This sample app allows the user to schedule jobs through the UI, and shows
189visual cues when the jobs are executed.
190</p>
191
192
193
194<h3 id="NavigationDrawerSample">NavigationDrawerSample</h3>
195<!--
196<div class="figure" style="width:220px">
197 <img src="" srcset="@2x.png 2x" alt="" height="375" />
198 <p class="img-caption">
199 <strong>Figure n.</strong> Single sentence summarizing the figure.
200 </p>
201</div>
202-->
203<p>
204This sample illustrates a common usage of the Android support library's
205{@link android.support.v4.widget.DrawerLayout} widget.
206</p>
207
208
209<!--
210<h3 id="">SampleName</h3>
211
212<div class="figure" style="width:220px">
213 <img src="" srcset="@2x.png 2x" alt="" height="375" />
214 <p class="img-caption">
215 <strong>Figure n.</strong> Single sentence summarizing the figure.
216 </p>
217</div>
218
219<p>
220**description**
221</p>
222-->