Android SurfaceHolder.unlockCanvasAndPost() does not cause redraw

后端 未结 3 869
鱼传尺愫
鱼传尺愫 2021-02-15 07:02

I\'m implementing a fairly standard app with the Android sdk that involves drawing using the SurfaceView, SurfaceHolder, Callback setup.

In my main thread (UI thread) I

3条回答
  •  一整个雨季
    2021-02-15 07:43

    So it turns out that when using SurfaceView you draw to a Surface that is underneath a Window. I was setting the background color of the View in xml; it turns out that sets the background color of the Window, not the Surface. In effect, I made the Window opaque so that you couldn't see the Surface underneath.

    Lesson Learned.

提交回复
热议问题