mattinger
07/01/2025, 4:28 PMDevices.TABLET
is an error, as it's an older form of specifying the device configuration. AS fixes it by inlining the configuration:
@Preview(device = "spec:width=1280dp,height=800dp,dpi=240")
I can then add things like orientation=portrait
. This is all well and good, but i'd rather use the built in pixel_tablet
spec and have it rotated to portrait mode. However, i can't figure out if there's a way to do that and then apply landscape mode. The documentation on using these new definitions seems a bit scarce where i'm looking (and the autocomplete only shows pixel_5
in the new type of spec)
https://developer.android.com/develop/ui/compose/tooling/previews
Anyone have suggestions as to how to do this without a fully custom device specification, and/or any other documentation i might have missed?