Take Screenshot of SurfaceView

前端 未结 6 2076
既然无缘
既然无缘 2020-11-27 17:32

Am developing a simple camera app. I have code that takes screenshot of the whole activity and writes it to the Sd card. the problem is that the Surfaceview returns a black

6条回答
  •  萌比男神i
    2020-11-27 18:03

    If your situation allows it, using a TextureView instead of a SurfaceView will make this problem a lot easier to solve. It has a method getBitmap() that returns a Bitmap of the current frame on the TextureView.

提交回复
热议问题