Extended SurfaceView's onDraw() method never called

后端 未结 4 1857
萌比男神i
萌比男神i 2020-11-29 22:22

I\'m trying to modify the SurfaceView I use for doing a camera preview in order to display an overlaying square. However, the onDraw method of the extended SurfaceView is ne

4条回答
  •  情书的邮戳
    2020-11-29 23:00

    Found it on the android-developers Google group. You simply have to add :

    setWillNotDraw(false)
    

    To the constructor. Now if someone could explain me why, that would be greatly appreciated.

提交回复
热议问题