开发者

drawing on an android activity

开发者 https://www.devze.com 2023-01-07 16:09 出处:网络
I am trying to put a background image and draw on top of that screen. I assumed activity will have a on draw method, but it does not have. it seems i need to use surfaceview. Can I put a surfaceview o

I am trying to put a background image and draw on top of that screen. I assumed activity will have a on draw method, but it does not have. it seems i need to use surfaceview. Can I put a surfaceview on top of the image view and make it transparent ? any example/tutor开发者_运维技巧ial i can refer to ?


In order to draw, you need a canvas which holds the draw calls.

Check chapter 4 from Hallo Android by Ed Burnette for a tutorial on the same.

You could optionally draw your graphics or animations into a View object from your layout.

Read this for more details.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号