我应该如何为我的视图设置动画,使其看起来像“滚动”?
我想将视图从屏幕顶部移动到底部,并且我知道如何在 Android 中使用动画进行布局。然而问题是我不只是想把它从顶部移到底部;我想让它看起来像“滚动”。我怎样才能实现这个目标?
谢谢
I want to move a View from the top to the bottom of the screen and I know how to use animations for layouts in Android. However the problem is that I don't just want to move it from the top to the bottom; I want to make it look like it's "rolling". How can I achieve this?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要平移和旋转动画的组合。为此,请使用 AnimationSet 。
应沿 x 轴进一步旋转,以产生滚动的效果。
请参阅 Rotate3dAnimation这
You need a combination of translation and rotation animation. Use AnimationSet for this.
Further Rotation should be done along x axis so that it gives a effect of rolling.
Refer Rotate3dAnimation for this