围绕圆圈旋转图像? [英] Rotate Images Around a Circle?

查看:23
本文介绍了围绕圆圈旋转图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请查看此应用快照:

这是一个银行应用程序.银行标志周围有 6 个按钮.您可以通过单击并按住其中一个图像来旋转图像,然后在任一方向(顺时针或逆时针)移动手指.因此,例如,我可以旋转它们以将 Currency Converter 图像放在 Login 图像的位置.

This is a bank application. it has 6 buttons around the bank logo. You can rotate the images by click-and-hold in one of them and move your finger in either direction (clockwise or counter-clockwise). So, for example, I can rotate them to put the Currency Convertor image in the place of the Login image.

在我的应用中,我也有 6 张图片,我想旋转它们.我该怎么做?

In my app, I have 6 Images too, I want to rotate them. How can I do that?

更新:顺便说一句,这是一个 iPhone 应用程序,但我认为这不是 iOS 特定的问题.

Update: BTW, this is an iPhone app but I think it is not iOS-specific issue.

推荐答案

就这样做

RotateAnimation rAnim = new RotateAnimation(0, 359, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
rAnim.setDuration(1000);
image.startAnimation(rAnim);

这篇关于围绕圆圈旋转图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆