https://kotlinlang.org logo
#compose-wear
Title
# compose-wear
y

yschimke

05/13/2022, 8:17 AM
Some Compose for Wear OS preview utilities from horologist https://github.com/google/horologist/pull/147/files#diff-9dc0d46485295a9dd95df35a83c430891488937f7cc1fafd0bbf08cd3b35c347
Copy code
@WearPreviewDevices
@WearPreviewFontSizes
@Composable
@OptIn(ExperimentalHorologistAudioUiApi::class)
fun VolumeScreenPreview(
    @PreviewParameter(AudioOutputProvider::class) audioOutput: AudioOutput
) {
👍🏻 1
👍🏼 1
👍 8
👍🏽 2
👌 4
message has been deleted
The previews highlighted a bug in the VolumeScreen layout that we later fixed.
c

Chris Sinco [G]

05/14/2022, 7:24 AM
Very nice use of the multi-preview API!!
y

yschimke

05/20/2022, 7:32 PM
Damn, just realised these don't work from a library. So it's going to remain a template to copy...
Copy code
@Retention(AnnotationRetention.SOURCE)
annotation class Preview(
I might see if I can get this approved as a PR for the sample so they get used if use the Android Studio project templates.
c

Chris Sinco [G]

05/20/2022, 7:51 PM
cc @amaury
y

yschimke

05/23/2022, 1:01 PM
Any chance that might get turned into AnnotationRetention.BINARY? I assume that would be sufficient for the IDE to use them.
a

amaury

05/23/2022, 2:57 PM
@yschimke can you please file a bug so I can assign it to the multi-preview owner to investigate library support? thanks!
a

amaury

05/23/2022, 5:55 PM
thanks!
2 Views