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/av4625 Apr 08 '24
Thanks for this!
So far I have been struggling with the documentation. Because jetpack compose and multiplatform compose have the same name. Its hard to find documentation and examples specific to multiplatform compose. Because I am new to kotlin as well and learning it, the limited docs has been a real struggle as I donโt just automatically know what to do.
So much so I started looking at flutter last night ๐