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);
这篇关于围绕圆圈旋转图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:围绕圆圈旋转图像?
基础教程推荐
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- iOS4 创建后台定时器 2022-01-01
