Android Open Source - transitions-everywhere View Overlay Utils 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;
/ / f r o m w w w . j a v a 2 s . c o m
import android.annotation.TargetApi;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.view.ViewGroup;
public class ViewOverlayUtils {
interface ViewOverlayUtilsImpl {
void addOverlay(ViewGroup sceneRoot, Drawable drawable);
void removeOverlay(ViewGroup sceneRoot, Drawable drawable);
}
static class BaseViewOverlayUtilsImpl implements ViewOverlayUtilsImpl {
@Override
public void addOverlay(ViewGroup sceneRoot, Drawable drawable) {
ViewOverlayPreJellybean viewOverlay = ViewOverlayPreJellybean.getOverlay(sceneRoot);
viewOverlay.addDrawable(drawable);
}
@Override
public void removeOverlay(ViewGroup sceneRoot, Drawable drawable) {
ViewOverlayPreJellybean viewOverlay = ViewOverlayPreJellybean.getOverlay(sceneRoot);
viewOverlay.removeDrawable(drawable);
}
}
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR2)
static class JellyBeanMR2ViewUtilsImpl implements ViewOverlayUtilsImpl {
@Override
public void addOverlay(ViewGroup sceneRoot, Drawable drawable) {
sceneRoot.getOverlay().add(drawable);
}
@Override
public void removeOverlay(ViewGroup sceneRoot, Drawable drawable) {
sceneRoot.getOverlay().remove(drawable);
}
}
private static final ViewOverlayUtilsImpl IMPL;
static {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
IMPL = new JellyBeanMR2ViewUtilsImpl();
} else {
IMPL = new BaseViewOverlayUtilsImpl();
}
}
public static void addOverlay(ViewGroup sceneRoot, Drawable drawable) {
IMPL.addOverlay(sceneRoot, drawable);
}
public static void removeOverlay(ViewGroup sceneRoot, Drawable drawable) {
IMPL.removeOverlay(sceneRoot, drawable);
}
}
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