https://kotlinlang.org logo
#compose
Title
# compose
v

vivek gupta

03/24/2024, 2:47 PM
Hey people, I am a beginner in android, I am learning compose, I have a question, how does preview annotation work under the hood? I couldn't find any resources.
z

zt

03/25/2024, 1:05 AM
It pretty much creates a mock android environment that's enough to run the compose UI. I'm sure there's a much better explanation but here's the source code responsible for that process https://cs.android.com/android-studio/platform/tools/adt/idea/+/mirror-goog-studio-main:compose-designer/src/com/android/tools/idea/compose/
v

vivek gupta

03/25/2024, 3:27 AM
well, thanks for the reply but couldn't understand anything from the link.
2 Views