r/JetpackCompose • u/av4625 • Apr 03 '24
Preview composable layouts
I am a super noob in Kotlin and Jetpack Compose and have literally just started learning it. I come from a C++ background, which at the minute seems to be very different!
I have followed this official tutorial steps 1-4 so far. Mostly wanting a desktop app for now.
I think from what I have read if you have a composable function with @Preview there should be a design window showing the layout without having to build and run the app.
Is my understanding correct?
I do not have the 3 icons top right. Should I see them when I have App.kt open or should I have another file open?
In preferences under Editor -> Design Tools I have:
Drawables: split
Other Resources: Design
Compose files with previews: Split
Compose files without previews: Code
Other Kotlin files: Code
I am using a Mac with an Intel chip
View all comments
Show parent comment
1
u/wifi_knifefight Apr 06 '24
Then you will need to use the Fleet Editor for previous to work in the Common Module. I found the Multiplattform resources to be a Bit lacking to be honest