我有一个grIDvIEw,我正试图在其中的图像上实现一个飞行.这与加载图库3D和图像文件夹“插入”时看到的效果非常相似.
我搜索了这个主题,并认为我需要使用VIEwAnimator并通过以下方式生成动画:http://developer.android.com/reference/android/widget/ViewAnimator.html#setInAnimation(android.view.animation.Animation)
但是,我不确定,如何实现这一点的任何帮助都将非常受欢迎!
问候
标记
解决方法:
您想要每个网格或整个视图的飞入动画吗?
对于整个视图,请使用:
Animation anim = AnimationUtils.loadAnimation(getApplicationContext(), R.anim.flyin); findVIEwByID(R.ID.YourVIEwID).setAnimation(anim); anim.start();
然后在文件flyin.xml中指定动画,如下所示:
<set xmlns:androID="http://schemas.androID.com/apk/res/androID" androID:shareInterpolator="true"> <scale androID:interpolator="@androID:anim/decelerate_interpolator" androID:fromXScale="1.0" androID:toXScale="0.0" androID:fromYScale="1.0" androID:toYScale="0.0" androID:pivotX="50%" androID:pivotY="50%" androID:fillAfter="false" androID:duration="250"/></set>
将该文件放在res / anim目录中.
总结以上是内存溢出为你收集整理的android – 用于GridView的动画全部内容,希望文章能够帮你解决android – 用于GridView的动画所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)