Anybody who tried getting a Bitmap from Composable View?
c
Chrimaeon
06/07/2023, 12:56 PM
Try searching in #compose and #compose-android . The question was asked a lot of times already.
☝️ 1
l
Landry Norris
06/07/2023, 2:18 PM
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.
Landry Norris
06/07/2023, 2:19 PM
Non-Android has ImageComposeScene, which will get you a Compose Image directly.
@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
Landry Norris
06/08/2023, 12:00 PM
ImageComposeScene isn't available on Android. It's on the other platforms