Override onDraw() or draw()?

后端 未结 6 944
隐瞒了意图╮
隐瞒了意图╮ 2021-02-18 20:27

My project is based on surfaceView and up until now I\'ve had all of my rendering in onDraw which I am overriding. All seemed to be OK.

However, I\'ve just updated my S

6条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-18 20:55

    onDraw gives you a canvas to draw to the screen.

    draw() allows you to manually draw a canvas to the screen (you have to make the canvas yourself).

提交回复
热议问题