Android Open Source - transitions-everywhere Transition Values






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

/*
 * Copyright (C) 2013 The Android Open Source Project
 *//from   w  ww .  j a v  a2s . c  om
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package android.transitions.everywhere;

import android.transitions.everywhere.utils.ArrayMap;
import android.view.View;
import android.view.ViewGroup;

import java.util.ArrayList;
import java.util.Map;

/**
 * Data structure which holds cached values for the transition.
 * The view field is the target which all of the values pertain to.
 * The values field is a map which holds information for fields
 * according to names selected by the transitions. These names should
 * be unique to avoid clobbering values stored by other transitions,
 * such as the convention project:transition_name:property_name. For
 * example, the platform might store a property "alpha" in a transition
 * "Fader" as "android:fader:alpha".
 * <p/>
 * <p>These values are cached during the
 * {@link Transition#captureStartValues(android.transitions.everywhere.TransitionValues)}
 * capture} phases of a scene change, once when the start values are captured
 * and again when the end values are captured. These start/end values are then
 * passed into the transitions via the
 * for {@link Transition#createAnimator(ViewGroup, android.transitions.everywhere.TransitionValues, android.transitions.everywhere.TransitionValues)}
 * method.</p>
 */
public class TransitionValues {

    /**
     * The View with these values
     */
    public View view;

    /**
     * The set of values tracked by transitions for this scene
     */
    public final Map<String, Object> values = new ArrayMap<String, Object>();
    /**
     * The Transitions that targeted this view.
     */
    final ArrayList<Transition> targetedTransitions = new ArrayList<Transition>();

    @Override
    public boolean equals(Object other) {
        if (other instanceof TransitionValues) {
            if (view == ((TransitionValues) other).view) {
                if (values.equals(((TransitionValues) other).values)) {
                    return true;
                }
            }
        }
        return false;
    }

    @Override
    public int hashCode() {
        return 31 * view.hashCode() + values.hashCode();
    }

    @Override
    public String toString() {
        String returnValue = "TransitionValues@" + Integer.toHexString(hashCode()) + ":\n";
        returnValue += "    view = " + view + "\n";
        returnValue += "    values:";
        for (String s : values.keySet()) {
            returnValue += "    " + s + ": " + values.get(s) + "\n";
        }
        return returnValue;
    }
}




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