Skip to content

Instantly share code, notes, and snippets.

@pranaypatel512
Created October 29, 2022 11:42
Show Gist options
  • Save pranaypatel512/c83833cfa36904920422cbb42eb7a5d3 to your computer and use it in GitHub Desktop.
Save pranaypatel512/c83833cfa36904920422cbb42eb7a5d3 to your computer and use it in GitHub Desktop.
Multipreview
/**
* Multipreview annotation that represents various device sizes. Add this annotation to a composable
* to render various devices.
*/
@Preview(showSystemUi = true, device = "spec:width=411dp,height=891dp", name = "Phone")
@Preview(showSystemUi = true, device = "spec:width=673.5dp,height=841dp,dpi=480", name = "Foldable")
@Preview(showSystemUi = true, device = "spec:width=1280dp,height=800dp,dpi=480", name = "Tablet")
@Preview(showSystemUi = true, device = "spec:width=1920dp,height=1080dp,dpi=480", name = "Desktop")
annotation class DevicePreviews
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment