// Path: app/src/main/java/com/xd/demi/utils/ViewSizeChangeAnimation.java
// public class ViewSizeChangeAnimation extends Animation {
//     int initialWidth;
//     int targetWidth;
//     View view;
// 
//     public ViewSizeChangeAnimation(View view, int targetWidth) {
//         this.view = view;
//         this.targetWidth = targetWidth;
//     }
// 
//     @Override
//     protected void applyTransformation(float interpolatedTime, Transformation t) {
//         view.getLayoutParams().width = initialWidth + (int) ((targetWidth - initialWidth) * interpolatedTime);
//         view.requestLayout();
//     }
// 
// 
//     @Override
//     public void initialize(int width, int height, int parentWidth, int parentHeight) {
//         this.initialWidth = width;
//         super.initialize(width, height, parentWidth, parentHeight);
//     }
// 
//     @Override
//     public boolean willChangeBounds() {
//         return true;
//     }
// }


import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.xd.demi.R;
import com.xd.demi.utils.ViewSizeChangeAnimation;
            clearRightGunDong();
            clearCenterGunDong();
            left_iv.setVisibility(View.VISIBLE);
            right_iv.setVisibility(View.GONE);
            center_iv_left.setVisibility(View.GONE);
            center_iv_right.setVisibility(View.GONE);
        } else if (flagMax == RIGHT_HEAD) {
            startRightGunDong();
            clearLeftGunDong();
            clearCenterGunDong();
            left_iv.setVisibility(View.GONE);
            right_iv.setVisibility(View.VISIBLE);
            center_iv_left.setVisibility(View.GONE);
            center_iv_right.setVisibility(View.GONE);
        } else {
            startCenterGunDong();
            clearLeftGunDong();
            clearRightGunDong();
            right_iv.setVisibility(View.GONE);
            left_iv.setVisibility(View.GONE);
            center_iv_left.setVisibility(View.VISIBLE);
            center_iv_right.setVisibility(View.VISIBLE);
        }
    }


    public void setPercentMoveAnimator() {
        LinearLayout.LayoutParams lp = new LayoutParams(0, LayoutParams.MATCH_PARENT, leftHead);
        LinearLayout.LayoutParams cp = new LayoutParams(0, LayoutParams.MATCH_PARENT, centerHead);
        LinearLayout.LayoutParams rp = new LayoutParams(0, LayoutParams.MATCH_PARENT, rightHead);
// Path: app/src/main/java/com/xd/demi/utils/ViewSizeChangeAnimation.java
// public class ViewSizeChangeAnimation extends Animation {
//     int initialWidth;
//     int targetWidth;
//     View view;
// 
//     public ViewSizeChangeAnimation(View view, int targetWidth) {
//         this.view = view;
//         this.targetWidth = targetWidth;
//     }
// 
//     @Override
//     protected void applyTransformation(float interpolatedTime, Transformation t) {
//         view.getLayoutParams().width = initialWidth + (int) ((targetWidth - initialWidth) * interpolatedTime);
//         view.requestLayout();
//     }
// 
// 
//     @Override
//     public void initialize(int width, int height, int parentWidth, int parentHeight) {
//         this.initialWidth = width;
//         super.initialize(width, height, parentWidth, parentHeight);
//     }
// 
//     @Override
//     public boolean willChangeBounds() {
//         return true;
//     }
// }


// Path: app/src/main/java/com/xd/demi/view/PercentView.java
import android.animation.ObjectAnimator;
import android.animation.PropertyValuesHolder;
import android.animation.ValueAnimator;
import android.content.Context;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.LinearInterpolator;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.xd.demi.R;
import com.xd.demi.utils.ViewSizeChangeAnimation;

            clearRightGunDong();
            clearCenterGunDong();
            left_iv.setVisibility(View.VISIBLE);
            right_iv.setVisibility(View.GONE);
            center_iv_left.setVisibility(View.GONE);
            center_iv_right.setVisibility(View.GONE);
        } else if (flagMax == RIGHT_HEAD) {
            startRightGunDong();
            clearLeftGunDong();
            clearCenterGunDong();
            left_iv.setVisibility(View.GONE);
            right_iv.setVisibility(View.VISIBLE);
            center_iv_left.setVisibility(View.GONE);
            center_iv_right.setVisibility(View.GONE);
        } else {
            startCenterGunDong();
            clearLeftGunDong();
            clearRightGunDong();
            right_iv.setVisibility(View.GONE);
            left_iv.setVisibility(View.GONE);
            center_iv_left.setVisibility(View.VISIBLE);
            center_iv_right.setVisibility(View.VISIBLE);
        }
    }


    public void setPercentMoveAnimator() {
        LinearLayout.LayoutParams lp = new LayoutParams(0, LayoutParams.MATCH_PARENT, leftHead);
        LinearLayout.LayoutParams cp = new LayoutParams(0, LayoutParams.MATCH_PARENT, centerHead);
        LinearLayout.LayoutParams rp = new LayoutParams(0, LayoutParams.MATCH_PARENT, rightHead);
        ViewSizeChangeAnimation animationL = new ViewSizeChangeAnimation(left_fr, (int) (lp.weight / 100 * getWidth()));