// Path: SunmiDesign/sunmiui/src/main/java/sunmi/sunmiui/utils/LogUtil.java
// public class LogUtil {
// 
//     public static final int VERBOSE = 1;
//     public static final int DEBUG = 2;
//     public static final int INFO = 3;
//     public static final int WARN = 4;
//     public static final int ERROR = 5;
//     public static final int NOTHING = 6;
//     public static int LEVEL = VERBOSE;
// 
//     public static void setLevel(int Level) {
//         LEVEL = Level;
//     }
// 
//     public static void v(String TAG, String msg) {
//         if (LEVEL <= VERBOSE && !TextUtils.isEmpty(msg)) {
//             MyLog(VERBOSE, TAG, msg);
//         }
//     }
// 
//     public static void d(String TAG, String msg) {
//         if (LEVEL <= DEBUG && !TextUtils.isEmpty(msg)) {
//             MyLog(DEBUG, TAG, msg);
//         }
//     }
// 
//     public static void i(String TAG, String msg) {
//         if (LEVEL <= INFO && !TextUtils.isEmpty(msg)) {
//             MyLog(INFO, TAG, msg);
//         }
//     }
// 
//     public static void w(String TAG, String msg) {
//         if (LEVEL <= WARN && !TextUtils.isEmpty(msg)) {
//             MyLog(WARN, TAG, msg);
//         }
//     }
// 
//     public static void e(String TAG, String msg) {
//         if (LEVEL <= ERROR && !TextUtils.isEmpty(msg)) {
//             MyLog(ERROR, TAG, msg);
//         }
//     }
// 
//     private static void MyLog(int type, String TAG, String msg) {
//         StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
// 
//         int index = 4;
//         String className = stackTrace[index].getFileName();
//         String methodName = stackTrace[index].getMethodName();
//         int lineNumber = stackTrace[index].getLineNumber();
// 
//         methodName = methodName.substring(0, 1).toUpperCase() + methodName.substring(1);
// 
//         StringBuilder stringBuilder = new StringBuilder();
//         stringBuilder.append("[ (").append(className).append(":").append(lineNumber).append(")#").append(methodName).append(" ] ");
//         stringBuilder.append(msg);
//         String logStr = stringBuilder.toString();
//         switch (type) {
//             case VERBOSE:
//                 Log.v(TAG, logStr);
//                 break;
//             case DEBUG:
//                 Log.d(TAG, logStr);
//                 break;
//             case INFO:
//                 Log.i(TAG, logStr);
//                 break;
//             case WARN:
//                 Log.w(TAG, logStr);
//                 break;
//             case ERROR:
//                 Log.e(TAG, logStr);
//                 break;
//             default:
//                 break;
//         }
// 
//     }
// 
// }


import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.graphics.Rect;
import android.support.v4.view.ViewCompat;
import android.transition.Transition;
import android.transition.TransitionValues;
import android.view.View;
import android.view.ViewAnimationUtils;
import android.view.ViewGroup;
import sunmi.sunmidesign.R;
import sunmi.sunmiui.utils.LogUtil;
package sunmi.sunmidesign.transitions;



/**
 * Created by KenMa on 2016/12/5.
 */
public class CustomTransition extends Transition {

    private static final String TAG = "CustomTransition";
    //可参考 http://blog.csdn.net/qibin0506/article/details/53248597
    private final String RECT = "rect";

    @Override
    public void captureStartValues(TransitionValues transitionValues) {
        View view = transitionValues.view;
        Rect rect = new Rect();
        view.getHitRect(rect);
        transitionValues.values.put(RECT, rect);
    }

    @Override
    public void captureEndValues(TransitionValues transitionValues) {
        View view = transitionValues.view;
        Rect rect = new Rect();
        view.getHitRect(rect);
        transitionValues.values.put(RECT, rect);
    }

    @Override
    public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
        if (startValues == null || endValues == null) return null;
        final View startView = startValues.view;
        final View endView = endValues.view;

        final Rect startRect = (Rect) startValues.values.get(RECT);
        final Rect endRect = (Rect) endValues.values.get(RECT);

// Path: SunmiDesign/sunmiui/src/main/java/sunmi/sunmiui/utils/LogUtil.java
// public class LogUtil {
// 
//     public static final int VERBOSE = 1;
//     public static final int DEBUG = 2;
//     public static final int INFO = 3;
//     public static final int WARN = 4;
//     public static final int ERROR = 5;
//     public static final int NOTHING = 6;
//     public static int LEVEL = VERBOSE;
// 
//     public static void setLevel(int Level) {
//         LEVEL = Level;
//     }
// 
//     public static void v(String TAG, String msg) {
//         if (LEVEL <= VERBOSE && !TextUtils.isEmpty(msg)) {
//             MyLog(VERBOSE, TAG, msg);
//         }
//     }
// 
//     public static void d(String TAG, String msg) {
//         if (LEVEL <= DEBUG && !TextUtils.isEmpty(msg)) {
//             MyLog(DEBUG, TAG, msg);
//         }
//     }
// 
//     public static void i(String TAG, String msg) {
//         if (LEVEL <= INFO && !TextUtils.isEmpty(msg)) {
//             MyLog(INFO, TAG, msg);
//         }
//     }
// 
//     public static void w(String TAG, String msg) {
//         if (LEVEL <= WARN && !TextUtils.isEmpty(msg)) {
//             MyLog(WARN, TAG, msg);
//         }
//     }
// 
//     public static void e(String TAG, String msg) {
//         if (LEVEL <= ERROR && !TextUtils.isEmpty(msg)) {
//             MyLog(ERROR, TAG, msg);
//         }
//     }
// 
//     private static void MyLog(int type, String TAG, String msg) {
//         StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();
// 
//         int index = 4;
//         String className = stackTrace[index].getFileName();
//         String methodName = stackTrace[index].getMethodName();
//         int lineNumber = stackTrace[index].getLineNumber();
// 
//         methodName = methodName.substring(0, 1).toUpperCase() + methodName.substring(1);
// 
//         StringBuilder stringBuilder = new StringBuilder();
//         stringBuilder.append("[ (").append(className).append(":").append(lineNumber).append(")#").append(methodName).append(" ] ");
//         stringBuilder.append(msg);
//         String logStr = stringBuilder.toString();
//         switch (type) {
//             case VERBOSE:
//                 Log.v(TAG, logStr);
//                 break;
//             case DEBUG:
//                 Log.d(TAG, logStr);
//                 break;
//             case INFO:
//                 Log.i(TAG, logStr);
//                 break;
//             case WARN:
//                 Log.w(TAG, logStr);
//                 break;
//             case ERROR:
//                 Log.e(TAG, logStr);
//                 break;
//             default:
//                 break;
//         }
// 
//     }
// 
// }


// Path: SunmiDesign/app/src/main/java/sunmi/sunmidesign/transitions/CustomTransition.java
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
import android.graphics.Rect;
import android.support.v4.view.ViewCompat;
import android.transition.Transition;
import android.transition.TransitionValues;
import android.view.View;
import android.view.ViewAnimationUtils;
import android.view.ViewGroup;
import sunmi.sunmidesign.R;
import sunmi.sunmiui.utils.LogUtil;

package sunmi.sunmidesign.transitions;



/**
 * Created by KenMa on 2016/12/5.
 */
public class CustomTransition extends Transition {

    private static final String TAG = "CustomTransition";
    //可参考 http://blog.csdn.net/qibin0506/article/details/53248597
    private final String RECT = "rect";

    @Override
    public void captureStartValues(TransitionValues transitionValues) {
        View view = transitionValues.view;
        Rect rect = new Rect();
        view.getHitRect(rect);
        transitionValues.values.put(RECT, rect);
    }

    @Override
    public void captureEndValues(TransitionValues transitionValues) {
        View view = transitionValues.view;
        Rect rect = new Rect();
        view.getHitRect(rect);
        transitionValues.values.put(RECT, rect);
    }

    @Override
    public Animator createAnimator(ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues) {
        if (startValues == null || endValues == null) return null;
        final View startView = startValues.view;
        final View endView = endValues.view;

        final Rect startRect = (Rect) startValues.values.get(RECT);
        final Rect endRect = (Rect) endValues.values.get(RECT);

        LogUtil.d(TAG,startRect.toString());