Animations

alpha.xml

<alpha
android:duration="2000"
android:fromAlpha="0"
android:repeatCount="2"
android:repeatMode="restart"
android:toAlpha="1" />


move.xml

<translate
android:duration="2000"
android:fromXDelta="0"
android:repeatCount="2"
android:repeatMode="restart"
android:toXDelta="200" />


rotation.xml

<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:repeatCount="2"
android:duration="4000"
android:pivotX="50%"
android:pivotY="50%"/>


scale.xml

<scale
android:duration="2000"
android:fromXScale="1"
android:fromYScale="1"
android:pivotX="50%"
android:pivotY="50%"
android:toXScale="2"
android:toYScale="2" />


Load Animation

Animation move = AnimationUtils.loadAnimation(AnimationsActivity.this, R.anim.move);
imageView.startAnimation(move);


Post a Comment

Previous Post Next Post