Anybody who tried getting a Bitmap from Composable...
# android
c
Anybody who tried getting a Bitmap from Composable View?
c
Try searching in #compose and #compose-android . The question was asked a lot of times already.
☝️ 1
l
From what I remember, the best way on Android is to put your compose content in a ComposeView inside an AndroidView, then use the old Android View way of getting a bitmap. Google will have examples of this.
Non-Android has ImageComposeScene, which will get you a Compose Image directly.
f
Without something like https://github.com/coil-kt/coil it’s kinda PITA
c
@Landry Norris Using AndroidView doesn't sound good to me. I will research about ImageComposeScene. Thanks. @fitermay Can any Compose View such as TextField can be converted to Bitmap using Coil? it seems like it is only for image loading.
l
ImageComposeScene isn't available on Android. It's on the other platforms