Car animation rotating wheels

删除回忆录丶 提交于 2019-12-04 19:52:11

Can you think of a better way to place the wheels ImageView instead of using padding?

The "right answer", I think, is to create your own layout manager. Leastways, that's what we've been told. I tried it once and couldn't get it to work.

The not-quite-so-right answer may be margins rather than padding -- I haven't tried animating a View with margins and so I do not know if margins rotate. Padding should rotate, since that is considered "inside" the widget.

The even-less-right answer is to use a transparent View as a shim, rather than margins or padding. Align your ImageView relative to the shim with no margins or padding, with the shim's size set to position your ImageView where you want it.

The well-if-you-know-how answer is to dump the widgets entirely and just draw it all using the Canvas and 2D graphics APIs. Angry Birds, for example, presumably does not use ImageViews.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!