You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I know that these are Twitter's Jetpack Compose Rules and not Google's Jetpack Compose Rules but I want to point out that the official AndroidX Preview annotations use Preview as prefix and not suffix.
/** * A MultiPreview annotation for displaying a @[Composable] method using the screen sizes of five different reference devices.*/
@Retention(AnnotationRetention.BINARY)
@Target(
AnnotationTarget.ANNOTATION_CLASS,
AnnotationTarget.FUNCTION
)
@Preview(name ="Phone", device =PHONE, showSystemUi =true)
@Preview(name ="Phone - Landscape",
device ="spec:width = 411dp, height = 891dp, orientation = landscape, dpi = 420",
showSystemUi =true)
@Preview(name ="Unfolded Foldable", device =FOLDABLE, showSystemUi =true)
@Preview(name ="Tablet", device =TABLET, showSystemUi =true)
@Preview(name ="Desktop", device =DESKTOP, showSystemUi =true)
annotationclassPreviewScreenSizes/** * A MultiPreview annotation for desplaying a @[Composable] method using seven standard font sizes.*/
@Retention(AnnotationRetention.BINARY)
@Target(
AnnotationTarget.ANNOTATION_CLASS,
AnnotationTarget.FUNCTION
)
@Preview(name ="85%", fontScale =0.85f)
@Preview(name ="100%", fontScale =1.0f)
@Preview(name ="115%", fontScale =1.15f)
@Preview(name ="130%", fontScale =1.3f)
@Preview(name ="150%", fontScale =1.5f)
@Preview(name ="180%", fontScale =1.8f)
@Preview(name ="200%", fontScale =2f)
annotationclassPreviewFontScale/** * A MultiPreview annotation for desplaying a @[Composable] method using light and dark themes. * * Note that the app theme should support dark and light modes for these previews to be different.*/
@Retention(AnnotationRetention.BINARY)
@Target(
AnnotationTarget.ANNOTATION_CLASS,
AnnotationTarget.FUNCTION
)
@Preview(name ="Light")
@Preview(name ="Dark", uiMode =UI_MODE_NIGHT_YESorUI_MODE_TYPE_NORMAL)
annotationclassPreviewLightDark/** * A MultiPreview annotation for desplaying a @[Composable] method using four different wallpaper colors. * * Note that the app should use a dynamic theme for these previews to be different.*/
@Retention(AnnotationRetention.BINARY)
@Target(
AnnotationTarget.ANNOTATION_CLASS,
AnnotationTarget.FUNCTION
)
@Preview(name ="Red", wallpaper =RED_DOMINATED_EXAMPLE)
@Preview(name ="Blue", wallpaper =BLUE_DOMINATED_EXAMPLE)
@Preview(name ="Green", wallpaper =GREEN_DOMINATED_EXAMPLE)
@Preview(name ="Yellow", wallpaper =YELLOW_DOMINATED_EXAMPLE)
annotationclassPreviewDynamicColors
The text was updated successfully, but these errors were encountered:
Describe the bug
I know that these are Twitter's Jetpack Compose Rules and not Google's Jetpack Compose Rules but I want to point out that the official AndroidX Preview annotations use
Preview
as prefix and not suffix.The text was updated successfully, but these errors were encountered: