Hello anyone has any idea about how to make previe...
# compose
f
Hello anyone has any idea about how to make previews in landscape ? I can maybe add a tablet as a device, but i would like to test several different devices with different screensizes, fontsizes and aspect ratios. Anyone has any ideia on how to achieve it ?
1
a
have you tried just setting the size of the preview, something like this?
@Preview(heightDp = 360, widthDp = 800)
f
I did set on one but I thought that the device id would affect it, maybe not, i will try just the same device with different sizes 👍 thanks
a
You can use
@PreviewScreenSizes
etc in 1.6.0-alpha, otherwise you could also just create your own specs
device
is a String after all. Have a look at how
androidx.compose.ui.tooling.preview.Device
specifies custom device width/height
f
thank you, i will look into it 👍