I have an imageview that I want to animate (just enlarge it) with an Animation. My XML code for the animation:
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="schemas.android.com/apk/res/android"
xmlns:android1="http://schemas.android.com/apk/res/android"
android:interpolator="@android:anim/linear_interpolator" >
<scale
android:duration="1000"
android:fillBefore="true"
android:fromXScale="1.0"
android:fromYScale="1.0"
android:toXScale="3.0"
android:toYScale="3.0" />
</set>
And in my Activity:
createAnims();
playButton.startAnimation(animPlay1);
Where the createAnims() method does this:
animPlay1 = AnimationUtils.loadAnimation(this, R.anim.playbut_scaleup);
animPlay1.setRepeatCount(2);
animPlay1.start();
The image is showing but the animation is not working. (The ImageView is called playButton)