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

Marcin Wisniowski

10/11/2023, 11:24 AM
Is it possible to determine if my Compose Preview is being run in Android Studio vs on a device/emulator?
c

curioustechizen

10/11/2023, 11:28 AM
LocalInspectionMode.current
- if it is true you are in the preview.
m

Marcin Wisniowski

10/11/2023, 11:33 AM
That doesn’t answer if the preview is being rendered in Android Studio or on a device. I know I’m in a preview.
c

curioustechizen

10/11/2023, 11:36 AM
Sorry I misunderstood your question
y

yschimke

10/11/2023, 12:20 PM
On device, that inspection mode is false
m

Marcin Wisniowski

10/11/2023, 12:26 PM
On device, that inspection mode is false
Oh that’s it then! Thanks
2 Views