如何在Android启动画面中为logo添加一个弹跳动画效果



我已经创建了一个启动画面,标志在中间,现在我想给它添加动画,就像标志从屏幕顶部掉下来,它反弹一次,然后停在屏幕中央。

有谁能帮我吗?
First position your logo to the center take reference of that logo and check below code : 
bounce.xml
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android"
    android:fillAfter="true"
    android:interpolator="@android:anim/bounce_interpolator">
    <scale
        android:duration="2000"
        android:fromXScale="1.0"
        android:fromYScale="0.0"
        android:toXScale="1.0"
        android:toYScale="1.0" />
</set>
use abow xml in your splash activity like this : 
Animation an2=AnimationUtils.loadAnimation(this,R.anim.bounce);
your_logo.startAnimation(an2);

最新更新