The following code samples were recently published for the L Developer Preview. You can download them in the Android SDK Manager under the SDK Samples component for the L Developer Preview.
Note: At this time, the downloadable projects are designed for use with Gradle and Android Studio.
BasicManagedProfile
This sample demonstrates how to create a managed profile. You can also:
- Enable or disable other apps, and set restrictions on them.
- Configure intents to be forwarded between the primary account and the managed profile.
- Wipe all the data associated with the managed profile.
Note: There can be only one managed profile on a device at a time.
Camera2Basic
This sample demonstrates the basic use of the Camera2 API. The sample code demonstrates how you can display camera preview and take pictures.
Camera2Video
This sample demonstrates how to record video using the Camera2 API.
ActivitySceneTransitionBasic
This sample demonstrates how to the use Activity
scene
transitions when transitioning from one activity to another. Uses a combination
of moveImage
and changeBounds
to nicely transition
from a grid of images to an activity with a large image and detail text.
ElevationBasic
This sample demonstrates two alternative ways to move a view in the z-axis:
- With a fixed elevation, using XML.
- Raising the elevation when the user taps on it, using
setTranslationZ()
.
ElevationDrag
This sample demonstrates a drag and drop action on different shapes. Elevation and z-translation are used to render the shadows. The views are clipped using different outlines.
ClippingBasic
This sample demonstrates clipping on a View
.
GameControllerSample
This sample implements a multi-player game, demonstrating game controller input handling.
Visual-Game-Controller
This sample displays events received from a game controller shown on the screen.
AndroidTVLeanbackSample
This sample demonstrates use of the Android TV Leanback Support Library.
JobSchedulerSample
This sample app allows the user to schedule jobs through the UI, and shows visual cues when the jobs are executed.
NavigationDrawerSample
This sample illustrates a common usage of the Android support library's
DrawerLayout
widget.