Marcin Wisniowski
12/02/2021, 6:06 PMisInEditMode()
in it to correctly handle that, but with Compose it just prevents my entire screen from being previewable?allan.conda
12/02/2021, 6:12 PMLocalInspectionMode.current
which is similar to that Edit ModeMarcin Wisniowski
12/02/2021, 6:22 PMWhy can’t it run in preview?It's a map view (think Google Maps), there would need to be a lot of mocking just for it to display nothing in the end. I'd rather just not display it.
You can tryI haven't seen that, thanks!which is similar to that Edit ModeLocalInspectionMode.current
allan.conda
12/02/2021, 6:33 PMChris Sinco [G]
12/02/2021, 7:52 PMMarcin Wisniowski
12/03/2021, 6:39 AMChris Sinco [G]
12/03/2021, 7:26 AMMarcin Wisniowski
12/03/2021, 7:40 AMLocalInspectionMode.current
solves this because I can disable the Composable to prevent it from crashing. In this case the Composable takes a function that produces an InputStream
for a map tile that it then draws. Unless I can produce `InputStream`s in the @Preview function that can be read as valid PNG's the Composable won't work.