If anyone here also has a Tile for their app. I've...
# compose-wear
y
If anyone here also has a Tile for their app. I've added support to the Horologist project for Android Studio previews (via the Compose @ Preview annotation). Here shown previewing different devices (small round, large round, square) and font sizes.
🙏 1
It makes the edit, compile, run cycle automatic (basically a couple of seconds) but also lets you test your design on multiple devices at once.
Because it needs to call your Tile generation without a Service running, it does similar to Compose stateful/stateless composables. So you have a data class that represents all input state required to render the tile, and then work on that. In the example above that is SingleTileState.
An example from @John O'Reilly people in space repo https://github.com/joreilly/PeopleInSpace/pull/139
j
oh this is awesome!
l
Aren't interactive previews supported as well?
y
Is this about these tiles previews? Yes, but they don't change. Tiles are static. And I haven't looked into handling the actions (load or intents).
Not sure if anyone else uses Fastlane, but I'm using these Tile previews to generate screenshots for my play store listing https://github.com/yschimke/rememberwear/blob/main/wear/src/androidTest/kotlin/com/google/wear/soyted/fastlane/ScreengrabTest.kt#L80-L85
message has been deleted