I have a problem with switching images in android. I want to create animation where when I click on the picture he rotate 360 and when he is in half, that mean 180 picture is switch on other. Image is in imageView and I have onClick method. At this time when I click on picture picture switch on other and after that animation is starting. I want to image change with other when I animation is 50% in duration.
This is my rotate XML:
<set xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="100%"
android:duration="1000"
/>
how Can I switch image when i start animation? This is possible?
Maybe try something like this:
but if you want to change this in half animation you should have two animations,