@@ -0,0 +1,2372 @@
+/*%0A * Copyright (C) 2015 Drakeet %3Cdrakeet.me@gmail.com%3E%0A *%0A * This file is part of Meizhi%0A *%0A * Meizhi is free software: you can redistribute it and/or modify%0A * it under the terms of the GNU General Public License as published by%0A * the Free Software Foundation, either version 3 of the License, or%0A * (at your option) any later version.%0A *%0A * Meizhi is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the%0A * GNU General Public License for more details.%0A *%0A * You should have received a copy of the GNU General Public License%0A * along with Meizhi.  If not, see %3Chttp://www.gnu.org/licenses/%3E.%0A */%0A%0Apackage com.marshalchen.ua.common.usefulModule;%0A%0Aimport android.animation.Animator;%0Aimport android.animation.AnimatorSet;%0Aimport android.animation.ObjectAnimator;%0Aimport android.content.Context;%0Aimport android.util.AttributeSet;%0Aimport android.widget.ImageView;%0A%0A%0A%0A/**%0A * %E8%AE%A9%E5%9B%BE%E7%89%87%E7%9C%8B%E8%B5%B7%E6%9D%A5%E5%83%8F%E6%98%AF%E5%8A%A8%E7%9A%84%E8%A7%86%E9%A2%91%E4%B8%80%E6%A0%B7%0A * Created by drakeet on 8/11/15.%0A */%0Apublic class VideoImageView extends ImageView implements Animator.AnimatorListener %7B%0A%0A    private boolean scale = false;%0A%0A%0A    public VideoImageView(Context context) %7B%0A        this(context, null);%0A    %7D%0A%0A%0A    public VideoImageView(Context context, AttributeSet attrs) %7B%0A        this(context, attrs, 0);%0A    %7D%0A%0A%0A    public VideoImageView(Context context, AttributeSet attrs, int defStyleAttr) %7B%0A        super(context, attrs, defStyleAttr);%0A        nextAnimation();%0A    %7D%0A%0A%0A    private void nextAnimation() %7B%0A        AnimatorSet anim = new AnimatorSet();%0A        if (scale) %7B%0A            anim.playTogether(ObjectAnimator.ofFloat(this, %22scaleX%22, 1.5f, 1f),%0A                    ObjectAnimator.ofFloat(this, %22scaleY%22, 1.5f, 1f));%0A        %7D else %7B%0A            anim.playTogether(ObjectAnimator.ofFloat(this, %22scaleX%22, 1, 1.5f),%0A                    ObjectAnimator.ofFloat(this, %22scaleY%22, 1, 1.5f));%0A        %7D%0A        anim.setDuration(10987);%0A        anim.addListener(this);%0A        anim.start();%0A        scale = !scale;%0A    %7D%0A%0A%0A    @Override public void onAnimationCancel(Animator arg0) %7B%0A    %7D%0A%0A%0A    @Override public void onAnimationEnd(Animator animator) %7B%0A        nextAnimation();%0A    %7D%0A%0A%0A    @Override public void onAnimationRepeat(Animator arg0) %7B%0A    %7D%0A%0A%0A    @Override public void onAnimationStart(Animator arg0) %7B%0A    %7D%0A%7D%0A

add VideoImageView