Skip to content

Commit

Permalink
Make Golden Tiles more prominent (#1210)
Browse files Browse the repository at this point in the history
  • Loading branch information
ithinkihaveacat authored Nov 13, 2024
1 parent 0724e40 commit 7991d0d
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 13 deletions.
43 changes: 30 additions & 13 deletions WearTilesKotlin/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
Wear Tiles Sample
=================

<img src="screenshots/tile_messaging.png" height="400" />
![Tile Messaging Screenshot](screenshots/tile_messaging.png)

[Tiles](https://d.android.com/training/wearables/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](https://developer.android.com/reference/androidx/wear/tiles/material/package-summary)
library (for UI) and [Horologist Tiles](https://github.com/google/horologist#-tiles) (preview
utilities and Kotlin-friendly wrappers).

It also showcases most of the Golden Tile layouts from the [Tiles Design Kit](https://developer.android.com/training/wearables/design/tiles-design-system#tile-templates)
in the `tiles.golden` package of the `debug` sourceset. To see what these look like, open one of the
"GoldenTilesPreviewsRowN" files and choose the "Split" or "Design" editor view.

<img src="screenshots/tile_preview_design_view.png" width="1024" alt="Screenshot of Android Studio showing the design view of GoldenTilesPreviewsRow1.kt. A grid view of Wear OS Tiles are displayed."/>
utilities and Kotlin-friendly wrappers).

Get Started
-----------
Expand All @@ -24,19 +18,42 @@ Build the project from the command line using `./gradlew build` or import it int
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.

Layout samples from the Tiles Design Kit can be found in `GoldenTilesPreviewsRow[N].kt`. Open the
file in "Split" or "Design" mode to view the previews without a device or emulator.

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](https://developer.android.com/training/wearables/design/tiles-design-system#tile-templates)
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.](screenshots/tile_preview_design_view.png)

`GoldenTilesPreviewsRow1.kt`:

![Screenshot of Tile previews for goal, workoutButtons, workoutLargeChip, run and ski](screenshots/golden1.png)

`GoldenTilesPreviewsRow2.kt`:

![Screenshot of Tile previews for heartRateSample, meditationChips, meditationButtons, timer and alarm](screenshots/golden2.png)

`GoldenTilesPreviewsRow3.kt`:

![Screenshot of Tile previews for weather, news, calendar, social and media](screenshots/golden3.png)

Support
-------

- Stack Overflow: https://stackoverflow.com/questions/tagged/wear-os
- 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
<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.
Binary file added WearTilesKotlin/screenshots/golden1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WearTilesKotlin/screenshots/golden2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added WearTilesKotlin/screenshots/golden3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 7991d0d

Please sign in to comment.