|
16 | 16 |
|
17 | 17 | package com.google.samples.apps.nowinandroid.core.ui |
18 | 18 |
|
| 19 | +import androidx.compose.ui.tooling.preview.Devices |
19 | 20 | import androidx.compose.ui.tooling.preview.Preview |
20 | 21 |
|
21 | 22 | /** |
22 | 23 | * Multipreview annotation that represents various device sizes. Add this annotation to a composable |
23 | 24 | * to render various devices. |
24 | 25 | */ |
25 | | -@Preview(name = "phone", device = "spec:shape=Normal,width=360,height=640,unit=dp,dpi=480") |
26 | | -@Preview(name = "landscape", device = "spec:shape=Normal,width=640,height=360,unit=dp,dpi=480") |
27 | | -@Preview(name = "foldable", device = "spec:shape=Normal,width=673,height=841,unit=dp,dpi=480") |
28 | | -@Preview(name = "tablet", device = "spec:shape=Normal,width=1280,height=800,unit=dp,dpi=480") |
| 26 | +@Preview(name = "phone", device = Devices.PHONE, showBackground = true) |
| 27 | +@Preview(name = "phone_in_landscape", widthDp = 891, heightDp = 411, showBackground = true) |
| 28 | +@Preview(name = "foldable", device = Devices.FOLDABLE, showBackground = true) |
| 29 | +@Preview(name = "tablet", device = Devices.TABLET, showBackground = true) |
| 30 | +@Preview(name = "desktop", device = Devices.DESKTOP, showBackground = true) |
29 | 31 | annotation class DevicePreviews |
0 commit comments