Skip to content

Latest commit

 

History

History

WearTilesKotlin

Wear Tiles Sample

Tile Messaging Screenshot

Tiles provide easy access to the information and actions users need in order to get things done. With a simple swipe from the watch face, a user can find out the latest forecast or start a timer.

This repository contains a sample tile built using the Tiles Material Components library (for UI) and Horologist Tiles (preview utilities and Kotlin-friendly wrappers).

Get Started

Build the project from the command line using ./gradlew build or import it into Android Studio to benefit from the IDE shortcuts like direct surface launching which lets you launch the Messaging tile directly to a device or emulator in just one click.

For the sample, start with MessagingTileService.kt; the layout (with IDE preview) can be found in MessagingTileLayout.kt.

Golden Tiles

The sample also showcases most of the Golden Tile layouts from the Tiles Design Kit in the tiles.golden package of the debug sourceset; see GoldenTilesPreviewsRow[N].kt. You may find it convenient to start with one of these layouts rather designing and coding your own from scratch.

To see what these look like, open one of the "GoldenTilesPreviewsRowN" files and choose the "Split" or "Design" editor view.

Screenshot of Android Studio showing the design view of GoldenTilesPreviewsRow1.kt. A grid view of Wear OS Tiles are displayed.

GoldenTilesPreviewsRow1.kt:

Screenshot of Tile previews for goal, workoutButtons, workoutLargeChip, run and ski

GoldenTilesPreviewsRow2.kt:

Screenshot of Tile previews for heartRateSample, meditationChips, meditationButtons, timer and alarm

GoldenTilesPreviewsRow3.kt:

Screenshot of Tile previews for weather, news, calendar, social and media

Support

If you've found an error in this sample, please file an issue: https://github.com/android/wear-os-samples

Patches are encouraged, and may be submitted by forking this project and submitting a pull request through GitHub. Please see CONTRIBUTING.md for more details.