旋转动画的android [英] Rotate animation android

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

问题描述

我试图做一个旋转的图像动画。
我需要围绕旋转图标的本身就像他们在进度做些什么,而我得到的图像一圈旋转。
这里是我的动画code

I'm trying to do a rotating image animation. I need to rotate an icon around itself just like they do in a progressbar, but what I'm getting is an image rotating around a circle. Here is my animation code

<?xml version="1.0" encoding="utf-8"?>
<rotate
xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="0"
android:toDegrees="360"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:duration="2500"
android:repeatCount="infinite"
android:repeatMode="restart"
/>

我要去哪里错了这里?
谢谢

Where am I going wrong in here? Thanks

推荐答案

好吧,我得到了,我错了。我给填充到我的形象造成它来点儿旋转,每次走到一边。
无论如何,我删除了填充,现在它的工作就好了。

Well I got where I was wrong. I gave padding to my image which caused it to move aside a little every time it rotated. Anyhow I removed the padding and now it's working just fine.

这篇关于旋转动画的android的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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