开发者

Android onDraw() method and adding images

I have a view where i have overriden the onDraw() function for animation purposes. However there are some images i would to like to be static in the view do i have to draw these images in the onDraw() func开发者_开发百科tion as well or can i apply these images via XML or something as a template?


Only override the onDraw() method of the views you want to draw by yourself. Otherwise you have to paint them yourself.


You can try a frame layout, which would have a child view for your static image and a child view for your animated images. Otherwise, I think you would have to redraw it each time. Also don't forget about other animation methods

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜