FileDocCategorySizeDatePackage
Rotate.javaAPI DocAndroid 5.1 API2093Thu Mar 12 22:22:10 GMT 2015android.transition

Rotate

public class Rotate extends Transition
This transition captures the rotation property of targets before and after the scene change and animates any changes.
hide

Fields Summary
private static final String
PROPNAME_ROTATION
Constructors Summary
Methods Summary
public voidcaptureEndValues(TransitionValues transitionValues)

        transitionValues.values.put(PROPNAME_ROTATION, transitionValues.view.getRotation());
    
public voidcaptureStartValues(TransitionValues transitionValues)


    
        
        transitionValues.values.put(PROPNAME_ROTATION, transitionValues.view.getRotation());
    
public android.animation.AnimatorcreateAnimator(android.view.ViewGroup sceneRoot, TransitionValues startValues, TransitionValues endValues)

        if (startValues == null || endValues == null) {
            return null;
        }
        final View view = endValues.view;
        float startRotation = (Float) startValues.values.get(PROPNAME_ROTATION);
        float endRotation = (Float) endValues.values.get(PROPNAME_ROTATION);
        if (startRotation != endRotation) {
            view.setRotation(startRotation);
            return ObjectAnimator.ofFloat(view, View.ROTATION,
                    startRotation, endRotation);
        }
        return null;