Skip to content

Instantly share code, notes, and snippets.

@LethalMaus
Created June 4, 2026 19:52
Show Gist options
  • Select an option

  • Save LethalMaus/6f0d2468581c3b57c39485dfa76d0b39 to your computer and use it in GitHub Desktop.

Select an option

Save LethalMaus/6f0d2468581c3b57c39485dfa76d0b39 to your computer and use it in GitHub Desktop.
Compose preview matrix for translation screenshots
package dev.jamescullimore.app.ui.preview
import androidx.compose.ui.tooling.preview.Preview
// The unsupported locale intentionally falls back to showing string keys.
@Preview(name = "Keys", locale = "eo", fontScale = 1f, group = "Keys")
@Preview(name = "English - 85%", locale = "en", fontScale = 0.85f, group = "English")
@Preview(name = "English - 100%", locale = "en", fontScale = 1.0f, group = "English")
@Preview(name = "English - 150%", locale = "en", fontScale = 1.5f, group = "English")
@Preview(name = "English - 200%", locale = "en", fontScale = 2.0f, group = "English")
@Preview(name = "Arabic - 85%", locale = "ar", fontScale = 0.85f, group = "Arabic")
@Preview(name = "Arabic - 100%", locale = "ar", fontScale = 1.0f, group = "Arabic")
@Preview(name = "Arabic - 150%", locale = "ar", fontScale = 1.5f, group = "Arabic")
@Preview(name = "Arabic - 200%", locale = "ar", fontScale = 2.0f, group = "Arabic")
annotation class CombinedPreviews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment