开发者

Android - Inflate a view and draw to canvas?

开发者 https://www.devze.com 2023-03-11 10:34 出处:网络
I have a problem that would be easily solved if I could somehow inflate a view (this part is doable) but instead of letting android\'s UI framework handle it, I would like to开发者_高级运维 be able to

I have a problem that would be easily solved if I could somehow inflate a view (this part is doable) but instead of letting android's UI framework handle it, I would like to开发者_高级运维 be able to explicitly draw it to a Canvas object. Is that possible?

Thanks


To be able to draw directly on the canvas, you'll have to extend the View to create your custom component. See http://developer.android.com/guide/topics/ui/custom-components.html

0

精彩评论

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