Hi, i share with my app a screenshot of view, full page.. so it works well but when i use and AndroidView i don’t see image or video inside AndroidView. Code in thread
Android75
02/08/2023, 6:45 AM
Copy code
val view = LocalView.current
val handler = Handler(Looper.getMainLooper())
handler.postDelayed(Runnable {
val bmp = Bitmap.createBitmap(
view.width, view.height,
Bitmap.Config.ARGB_8888
).applyCanvas {
view.draw(this)
}
bmp.let {
viewModel.shareFile(bmp)
}
}, 500)
This code works in every screen but if i use and AndroidView for example to use ExoPlayer i don’t see the content of AndroidView
Android75
02/08/2023, 6:51 AM
I use a Box and put AndroidView and a Text and bitmap has this text..
e
ephemient
02/08/2023, 6:53 AM
not a Kotlin or Compose issue. SurfaceView is not drawn like other views, it is composited on afterwards.
a
Android75
02/08/2023, 6:56 AM
so i have to get a bitmap from SurfaceView and put in my screen and after create my bitmap