Android SurfaceHolder.unlockCanvasAndPost() does not cause redraw

后端 未结 3 765
没有蜡笔的小新
没有蜡笔的小新 2021-02-15 07:20

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:50

    That's not how SurfaceView works. Calling unlockCanvasAndPost() does not invoke onDraw(), that's the whole point of using a SurfaceView. A SurfaceView's surface lives in a different window.

提交回复
热议问题