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).
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
.
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.
GoldenTilesPreviewsRow1.kt
:
GoldenTilesPreviewsRow2.kt
:
GoldenTilesPreviewsRow3.kt
:
- Stack Overflow: https://stackoverflow.com/questions/tagged/wear-os
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.