Morning. Any way of getting a preview in all suppo...
# compose
m
Morning. Any way of getting a preview in all supported locales at once? I know that I can add several preview annotations, but supporting 18 languages, this solution is ugly.
Copy code
@Preview(locale = "en")
@Preview(locale = "es")
w
You can make a grouped preview annotation with all the locales you support:
Copy code
@Preview(locale = "en")
@Preview(locale = "es")
annotation class AllLocalesPreview
Then you can simply add
@AllLocalesPreview
to your preview function. https://developer.android.com/develop/ui/compose/tooling/previews#preview-multipreview
m
This is great. Thanks for sharing!
👍 1