Andre Stefanov
10/14/2021, 11:09 AMplaceholder
as the image being displayed in studio preview in case LocalInspectionMode
provides true
but this makes things actually worse for me. What i actually want to achieve:
• preview of the image composable should include cases for success, error and loading
• i would use PreviewParameterProvider
to pass the different states to the preview as parameters
• i dont want to use placeholder
for that because this would also change behavior of the actual code under test (i dont need a placeholder ... just a preview)
• in best case i would like to use a mocked okhttp
client for that ... but seems like this is not really trivial with current android studio preview (some classes cant be found)
• also i cant control the state of ImagePainter
(some animations are based on it) because it is hardcoded and cant be passed as parameter or anything else.
Do you know a proper example/way of how to setup my custom composable to achieve proper preview without changing actual code logic of the composable?