Skip to content

Commit 488113f

Browse files
authored
Update device parameters for DevicePreviews (#1684)
Address b/500283228
2 parents 120496e + f4eeb70 commit 488113f

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

JetNews/app/src/main/java/com/example/jetnews/utils/MultipreviewAnnotations.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,17 @@ annotation class FontScalePreviews
4646
@Preview(
4747
name = "phone",
4848
group = "devices",
49-
device = "spec:shape=Normal,width=360,height=640,unit=dp,dpi=480",
49+
device = "spec:width=360dp,height=640dp,dpi=480",
5050
)
5151
@Preview(
5252
name = "foldable",
5353
group = "devices",
54-
device = "spec:shape=Normal,width=673,height=841,unit=dp,dpi=480",
54+
device = "spec:width=673dp,height=841dp,dpi=480",
5555
)
5656
@Preview(
5757
name = "tablet",
5858
group = "devices",
59-
device = "spec:shape=Normal,width=1280,height=800,unit=dp,dpi=480",
59+
device = "spec:width=1280dp,height=800dp,dpi=480",
6060
)
6161
annotation class DevicePreviews
6262

Jetcaster/mobile/src/main/java/com/example/jetcaster/ui/tooling/DevicePreviews.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import androidx.compose.ui.tooling.preview.Preview
2121

2222
@Preview(name = "small-phone", device = Devices.PIXEL_4A)
2323
@Preview(name = "phone", device = Devices.PHONE)
24-
@Preview(name = "landscape", device = "spec:shape=Normal,width=640,height=360,unit=dp,dpi=480")
24+
@Preview(name = "landscape", device = "spec:width=640dp,height=360dp,dpi=480")
2525
@Preview(name = "foldable", device = Devices.FOLDABLE)
2626
@Preview(name = "tablet", device = Devices.TABLET)
2727
annotation class DevicePreviews

0 commit comments

Comments
 (0)