Android Open Source - transitions-everywhere View Utils Lolipop From Project Back to project page transitions-everywhere .
License The source code is released under:
Apache License
If you think the Android project transitions-everywhere listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code package android.transitions.everywhere.utils;
/ / w w w . j a v a 2 s . c o m
import android.annotation.TargetApi;
import android.graphics.Matrix;
import android.os.Build;
import android.view.View;
import android.view.ViewGroup;
import java.lang.reflect.Method;
/**
* Created by Andrey Kulikov on 20.10.14.
*/
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
class ViewUtilsLolipop extends ViewUtils.ViewUtilsJellyBeanMR2 {
private static final Class CLASS_GhostView = ReflectionUtils.getClass("android.view.GhostView" );
private static final Method METHOD_addGhost = ReflectionUtils.getMethod(CLASS_GhostView,
"addGhost" , View.class, ViewGroup.class, Matrix.class);
private static final Method METHOD_removeGhost = ReflectionUtils.getMethod(CLASS_GhostView,
"removeGhost" , View.class);
private static final Method METHOD_transformMatrixToGlobal =
ReflectionUtils.getMethod(View.class, "transformMatrixToGlobal" , Matrix.class);
private static final Method METHOD_transformMatrixToLocal =
ReflectionUtils.getMethod(View.class, "transformMatrixToLocal" , Matrix.class);
private static final Method METHOD_setAnimationMatrix =
ReflectionUtils.getMethod(View.class, "setAnimationMatrix" , Matrix.class);
@Override
public void transformMatrixToGlobal(View view, Matrix matrix) {
ReflectionUtils.invoke(view, null, METHOD_transformMatrixToGlobal, matrix);
}
@Override
public void transformMatrixToLocal(View view, Matrix matrix) {
ReflectionUtils.invoke(view, null, METHOD_transformMatrixToLocal, matrix);
}
@Override
public void setAnimationMatrix(View view, Matrix matrix) {
ReflectionUtils.invoke(view, null, METHOD_setAnimationMatrix, matrix);
}
@Override
public View addGhostView(View view, ViewGroup viewGroup, Matrix matrix) {
return (View) ReflectionUtils.invoke(null, null, METHOD_addGhost, view, viewGroup, matrix);
}
@Override
public void removeGhostView(View view) {
ReflectionUtils.invoke(view, null, METHOD_removeGhost, view);
}
@Override
public void setTransitionName(View v, String name) {
v.setTransitionName(name);
}
@Override
public String getTransitionName(View v) {
return v.getTransitionName();
}
@Override
public float getTranslationZ(View view) {
return view.getTranslationZ();
}
@Override
public void setTranslationZ(View view, float z) {
view.setTranslationZ(z);
}
}
Java Source Code List android.transitions.everywhere.ArcMotion.java android.transitions.everywhere.AutoTransition.java android.transitions.everywhere.ChangeBounds.java android.transitions.everywhere.ChangeClipBounds.java android.transitions.everywhere.ChangeImageTransform.java android.transitions.everywhere.ChangeTransform.java android.transitions.everywhere.CircularPropagation.java android.transitions.everywhere.Explode.java android.transitions.everywhere.Fade.java android.transitions.everywhere.IntProperty.java android.transitions.everywhere.PathMotion.java android.transitions.everywhere.PathParser.java android.transitions.everywhere.PatternPathMotion.java android.transitions.everywhere.Scene.java android.transitions.everywhere.SidePropagation.java android.transitions.everywhere.Slide.java android.transitions.everywhere.TransitionInflater.java android.transitions.everywhere.TransitionManager.java android.transitions.everywhere.TransitionPropagation.java android.transitions.everywhere.TransitionSet.java android.transitions.everywhere.TransitionUtils.java android.transitions.everywhere.TransitionValuesMaps.java android.transitions.everywhere.TransitionValues.java android.transitions.everywhere.Transition.java android.transitions.everywhere.TranslationAnimationCreator.java android.transitions.everywhere.VisibilityPropagation.java android.transitions.everywhere.Visibility.java android.transitions.everywhere.hidden.ChangeScroll.java android.transitions.everywhere.hidden.ChangeText.java android.transitions.everywhere.hidden.Crossfade.java android.transitions.everywhere.hidden.Recolor.java android.transitions.everywhere.hidden.Rotate.java android.transitions.everywhere.utils.AnimatorUtils.java android.transitions.everywhere.utils.ArrayMap.java android.transitions.everywhere.utils.ContainerHelpers.java android.transitions.everywhere.utils.MapCollections.java android.transitions.everywhere.utils.MatrixUtils.java android.transitions.everywhere.utils.Objects.java android.transitions.everywhere.utils.PropertyCompatObject.java android.transitions.everywhere.utils.RectEvaluator.java android.transitions.everywhere.utils.ReflectionUtils.java android.transitions.everywhere.utils.ViewGroupOverlayUtils.java android.transitions.everywhere.utils.ViewGroupUtilsJellyBeanMr2.java android.transitions.everywhere.utils.ViewGroupUtils.java android.transitions.everywhere.utils.ViewOverlayPreJellybean.java android.transitions.everywhere.utils.ViewOverlayUtils.java android.transitions.everywhere.utils.ViewUtilsKitKat.java android.transitions.everywhere.utils.ViewUtilsLolipop.java android.transitions.everywhere.utils.ViewUtils.java com.github.andkulikov.transitions.everywhere.MainActivity.java