is there any flag like legacy views ‘inEditMode’ s...
# compose
m
is there any flag like legacy views ‘inEditMode’ so we can render different things on preview (for example, coil url image) ?
a
LocalInspectionMode.current
By the way coil's
rememberImagePainter()
already uses this to show placeholder only in preview.
m
ya. but for some reason the preview keeps giving me a weird error
The following classes could not be found: - androidx.compose.ui.tooling.ComposeViewAdapter (Fix Build Path, Edit XML, Create Class)
no idea how to fix it. Did some searches but nth i tried works
a
Did you add
androidx.compose.ui:ui-tooling
dependency?
m
Copy code
androidx.compose.ui:ui-tooling-preview
ya
a
androidx.compose.ui:ui-tooling-preview
is different from
androidx.compose.ui:ui-tooling
.
The former contains only annotations.
m
hm. its the generated dependecies from a fresh project in AS 😛
gonna try that. thanks!!
z
I’ve seen that error when using Bumblebee I think, whereas the preview worked correctly in Arctic Fox
😞 1