Robert Ly | d82b45c | 2014-06-16 14:02:04 -0700 | [diff] [blame] | 1 | page.title=Samples |
| 2 | |
| 3 | @jd:body |
| 4 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 5 | <p>The following code samples are provided for the L Developer Preview. You can |
Robert Ly | 18ec418 | 2014-06-24 21:17:45 -0700 | [diff] [blame] | 6 | download them in the Android SDK Manager under the <b>SDK Samples</b> component |
| 7 | for the L Developer Preview.</p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 15 | <h3 id="BasicManagedProfile">BasicManagedProfile</h3> |
| 16 | <div class="figure" style="width:220px"> |
| 17 | <img src="{@docRoot}preview/images/BasicManagedProfile.png" |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 18 | srcset="{@docRoot}preview/images/BasicManagedProfile@2x.png 2x" |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 36 | <p><a href="http://github.com/googlesamples/android-BasicManagedProfile">Get it on GitHub</a></p> |
| 37 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 |
| 50 | demonstrates how you can display camera preview and take pictures.</p> |
| 51 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 52 | <p><a href="http://github.com/googlesamples/android-Camera2Basic">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 64 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 65 | <p>This sample demonstrates how to record video using the Camera2 API.</p> |
| 66 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 67 | <p><a href="http://github.com/googlesamples/android-Camera2Video">Get it on GitHub</a></p> |
| 68 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 69 | <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 |
| 80 | transitions when transitioning from one activity to another. Uses a combination |
| 81 | of <code>moveImage</code> and <code>changeBounds</code> to nicely transition |
| 82 | from a grid of images to an activity with a large image and detail text. </p> |
| 83 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 84 | <p><a href="http://github.com/googlesamples/android-ActivitySceneTransition">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 95 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 96 | <p> |
| 97 | This 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 Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 105 | <p><a href="http://github.com/googlesamples/android-ElevationBasic">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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. |
| 118 | Elevation and z-translation are used to render the shadows. The views are |
| 119 | clipped using different outlines.</p> |
| 120 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 121 | <p><a href="http://github.com/googlesamples/android-ElevationDrag">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 133 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 134 | <p> |
| 135 | This sample demonstrates clipping on a {@link android.view.View}. |
| 136 | </p> |
| 137 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 138 | <p><a href="http://github.com/googlesamples/android-ClippingBasic">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 139 | |
Robert Ly | 18ec418 | 2014-06-24 21:17:45 -0700 | [diff] [blame] | 140 | <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 Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 158 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 159 | <p> |
| 160 | This sample implements a multi-player game, demonstrating game controller input |
| 161 | handling. |
| 162 | </p> |
| 163 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 164 | <p><a href="http://github.com/googlesamples/androidtv-GameController">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 176 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 177 | <p> |
| 178 | This sample displays events received from a game controller shown on the screen. |
| 179 | </p> |
| 180 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 181 | <p><a href="http://github.com/googlesamples/androidtv-VisualGameController">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 192 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 193 | <p> |
| 194 | This sample demonstrates use of the Android TV Leanback Support Library. |
| 195 | </p> |
| 196 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 197 | <p><a href="http://github.com/googlesamples/androidtv-Leanback">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 198 | |
| 199 | <h3 id="JobSchedulerSample">JobSchedulerSample</h3> |
| 200 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 201 | <p> |
| 202 | This sample app allows the user to schedule jobs through the UI, and shows |
| 203 | visual cues when the jobs are executed. |
| 204 | </p> |
| 205 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 206 | <p><a href="http://github.com/googlesamples/android-JobScheduler">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 217 | |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 218 | <p> |
| 219 | This sample illustrates a common usage of the Android support library's |
| 220 | {@link android.support.v4.widget.DrawerLayout} widget. |
| 221 | </p> |
| 222 | |
Ricardo Cervera | a1bc384 | 2014-06-25 17:14:03 -0700 | [diff] [blame^] | 223 | <p><a href="http://github.com/googlesamples/android-NavigationDrawer">Get it on GitHub</a></p> |
Andrew Solovay | fb7a287 | 2014-06-24 15:35:09 -0700 | [diff] [blame] | 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 | --> |