Use startAnimation.
Below is an example snippet
trans = new TranslateAnimation(0, 100, 0, 100);
trans.setDuration(250);
trans.setInterpolator(new AccelerateInterpolator(1.0f));
someView.startAnimation(trans);
plus I also want to gradually increase its height,
To do this, you will scale the animation.
If you want to combine them into one file, use Set.
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator">
<scale android:fromXScale="0.0" android:fromYScale="0.0"
android:toXScale="1.0" android:toYScale="1.0"
android:duration="700" android:fillBefore="false" />
<translate android:fromXDelta="-200" android:fromYDelta="-200"
android:duration="700" />
</set>
Put below code inside java file:
Animation logoMoveAnimation = AnimationUtils.loadAnimation(this, R.anim.logoanimation);
logoIV.startAnimation(logoMoveAnimation);
setAnimation
. .
startAnimation
, , startAnimation. , ,
1) ,
2) , .