I'm sure I'm missing something obvious, but when I...
# compose-wear
g
I'm sure I'm missing something obvious, but when I add a preview, the preview looks like it's a phone... how do you change to a watch screen shape and size?
โœ… 1
s
Hi - support for different Wear device shapes was recently released in the Chipmunk canary, but you won't have seen it if you're still on Arctic Fox or Bumblebee versions - see https://developer.android.com/studio/preview. Alternatively, you can set properties on the @Preview annotation to customize (e.g. to set width and height) - a good example of that is in https://developer.android.com/codelabs/compose-for-wear-os#1, see the previews for ReusableComponents.
๐Ÿ‘๐Ÿผ 1
๐Ÿ‘ 4
g
Thanks Steve!
c
It seems we are still missing Wear devices for the Preview annotation in Chipmunk and likely are not going to have it until the next Studio release ๐Ÿ˜ž
In the meantime, Iโ€™ve created a small utility which you may find useful in the interim: https://gist.github.com/c5inco/2210c3d00c49d100dc7348b06ad58ca1
Useful together with Interactive Preview, though be sure not to deploy the scaffold to the device ๐Ÿ˜…
๐Ÿ‘๐Ÿฝ 1
โค๏ธ 3
๐Ÿ‘๐Ÿผ 1
๐Ÿ‘ 3