Android Gmail listview flip animation

I tried to create an animation, as we saw in Gmail's listview widget. When we select a line, we press the circle on the left, and it will flip to a check mark

What I'm going to do is create an animation set with two scale animation. It doesn't work for some strange reasons

I only use one picture for the time being and apply the flip function to the picture. This is my anim.xml:

<?xml version="1.0" encoding="utf-8"?>
<set>
    <scale
        android:duration="2000"
        android:fromXScale="1.0"
        android:fromYScale="1.0"
        android:toXScale="0.0"
        android:toYScale="1.0"
        android:pivotX="50%"
        android:pivotY="50%"
        >
    </scale>
    <scale
        android:startOffset="2000"
        android:duration="2000"
        android:fromXScale="0.0"
        android:fromYScale="1.0"
        android:toXScale="1.0"
        android:toYScale="1.0"
        android:pivotX="50%"
        android:pivotY="50%"
        >
    </scale>
</set>

Animation is easy to read. I'm zooming from 100 to 0 and then back to 100. When I apply it to ImageView, I can't see any animation at all

This is how I load the animation:

final AnimationSet animationSet = (AnimationSet) AnimationUtils.loadAnimation(this,R.anim.flip);
mCompanyProfileImage.startAnimation(animationSet);

What on earth did I do wrong?

resolvent:

You are lucky. Because I just developed a new flipview library, which contains basic flipping animation and extends viewflipper. I mean a fully customizable Library in which you can exchange any view and layout of any type of animation and shape (and more), including Gmail image flipping for search

Please have a look

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>