启动画面的Android图像动画 [英] Android image animation for splash screen
本文介绍了启动画面的Android图像动画的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是android应用程序的新手,现在我正在创建一个移动电子商务android application.so,我想创建一个带有动画的启动屏幕,就像礼物盒随着旋转从上到下掉落一样功能.请帮帮我
Hi i am pretty new to android application .now i am creating one m-commerce android application.so i want to create one splash screen with animation,Its like the gift boxes will fall from top to bottom of the activity with rotation functionality.please help me out
预先感谢
推荐答案
在res/anim目录中创建名为rotate_move_down.xml的动画资源文件
create animation resource file named rotate_move_down.xml inside res/anim directory
<set xmlns:android="http://schemas.android.com/apk/res/android" android:fillAfter="true">
<!-- Rotate -->
<rotate
android:duration="1200"
android:fromDegrees="0"
android:interpolator="@android:anim/linear_interpolator"
android:pivotX="50%"
android:pivotY="50%"
android:toDegrees="360" />
<!-- down move -->
<translate
android:duration="1500"
android:fromYDelta="0%p"
android:interpolator="@android:anim/linear_interpolator"
android:toYDelta="80%p" />
</set>
并使用此动画进行这样的启动活动.
and use this animation to the splash activity like this .
Animation animation= AnimationUtils.loadAnimation(MainActivity.this,R.anim.rotate_move_down);
imageView.startAnimation(animation);
xml文件中的
imageView.
imageView in your xml file.
这篇关于启动画面的Android图像动画的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文