Rotate Images Around a Circle?(围绕圆圈旋转图像?)
问题描述
请查看此应用快照:
这是一个银行应用程序.银行标志周围有 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);
这篇关于围绕圆圈旋转图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:围绕圆圈旋转图像?


基础教程推荐
- EditText 中的 setHintTextColor() 2022-01-01
- 在 iOS 7 下 CCMenu 错位 2022-01-01
- 在视图控制器的宽度上水平均匀分布 UIButton 的最简单方法? 2022-01-01
- 更改 UITableView 部分标题的颜色 2022-01-01
- UINavigationItem 的持久 rightBarButtonItem 属性 2022-01-01
- Android - 如何在runOnUiThread 中将数据传递给Runnable? 2022-01-01
- UINavigationBar 隐藏按钮文本 2022-01-01
- 从 UIWebView 访问元数据 2022-01-01
- Firebase 云消息传递令牌未生成 2022-01-01
- iOS4 创建后台定时器 2022-01-01