public class Scale
extends android.transition.Visibility
Visibility transition implementation that tracks changes to the visibility of target
views in the start and end scenes and scales up or down views in the scene. Visibility is
determined by the View.setVisibility(int) state of the views.
Scale transition can be described in a resource file by using the transition tag with
class attribute set to universum.studios.android.transition.Scale, along with
Xml attributes referenced below.
Scale Attributes| Modifier and Type | Class and Description |
|---|---|
static interface |
Scale.ScaleMode
Defines an annotation for determining set of allowed modes for Scale transition.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
PROPERTY_SCALE_X
Name of the view's property used to scale size of a specific view along its x axis.
|
static String |
PROPERTY_SCALE_Y
Name of the view's property used to scale size of a specific view along its y axis.
|
| Constructor and Description |
|---|
Scale()
|
Scale(android.content.Context context,
android.util.AttributeSet attrs)
Creates a new instance of Scale transition with animation property values set from the
specified attrs.
|
Scale(int mode)
Creates a new instance of Scale transition with the specified mode.
|
| Modifier and Type | Method and Description |
|---|---|
static android.animation.Animator |
createAnimator(android.view.View view,
float startScale,
float endScale)
Creates a new instance of scale Animator for the specified view.
|
Float |
getPivotX()
Returns the x coordinate for pivot of the scale animation.
|
float |
getPivotXFraction()
Returns the fraction of the pivot x coordinate.
|
Float |
getPivotY()
Returns the y coordinate for pivot of the scale animation.
|
float |
getPivotYFraction()
Returns the fraction of the pivot y coordinate.
|
android.animation.Animator |
onAppear(android.view.ViewGroup sceneRoot,
android.view.View view,
android.transition.TransitionValues startValues,
android.transition.TransitionValues endValues) |
android.animation.Animator |
onDisappear(android.view.ViewGroup sceneRoot,
android.view.View view,
android.transition.TransitionValues startValues,
android.transition.TransitionValues endValues) |
void |
setPivotX(Float pivotX)
Sets a pivot x coordinate for scale animation.
|
void |
setPivotXFraction(float fractionX)
Sets a fraction for the pivot x coordinate.
|
void |
setPivotY(Float pivotY)
Sets a pivot y coordinate for scale animation.
|
void |
setPivotYFraction(float fractionY)
Sets a fraction for the pivot y coordinate.
|
captureEndValues, captureStartValues, createAnimator, getMode, getTransitionProperties, isTransitionRequired, isVisible, onAppear, onDisappear, setModeaddListener, addTarget, addTarget, addTarget, addTarget, canRemoveViews, clone, excludeChildren, excludeChildren, excludeChildren, excludeTarget, excludeTarget, excludeTarget, excludeTarget, getDuration, getEpicenter, getEpicenterCallback, getInterpolator, getName, getPathMotion, getPropagation, getStartDelay, getTargetIds, getTargetNames, getTargets, getTargetTypes, getTransitionValues, removeListener, removeTarget, removeTarget, removeTarget, removeTarget, setDuration, setEpicenterCallback, setInterpolator, setMatchOrder, setPathMotion, setPropagation, setStartDelay, toStringpublic static final String PROPERTY_SCALE_X
public static final String PROPERTY_SCALE_Y
public Scale()
public Scale(int mode)
mode - One of Visibility.MODE_IN or Visibility.MODE_OUT or theirs combination.public Scale(android.content.Context context,
android.util.AttributeSet attrs)
context - Context used to obtain values from the specified attrs.attrs - Set of attributes from which to obtain animation property values for the scale
animation.public static android.animation.Animator createAnimator(android.view.View view,
float startScale,
float endScale)
view - The view for which to create the requested animator.startScale - Scale from which to start the animation.endScale - Scale at which should the animation end.public void setPivotX(Float pivotX)
Default value: null
pivotX - The desired pivot x coordinate in pixels. May be null to use pivot
fraction specified via setPivotXFraction(float) instead.getPivotX(),
setPivotXFraction(float),
setPivotY(Float)public Float getPivotX()
null if no pivot has been specified.setPivotX(Float)public void setPivotY(Float pivotY)
Default value: null
pivotY - The desired pivot y coordinate in pixels. May be null to use pivot
fraction specified via setPivotYFraction(float) instead.getPivotY(),
setPivotYFraction(float),
setPivotX(Float)public Float getPivotY()
null if no pivot has been specified.setPivotY(Float)public void setPivotXFraction(float fractionX)
setPivotX(Float).
Default value: 0.5
fractionX - The desired fraction from the [0.0, 1.0] range.getPivotYFraction(),
setPivotXFraction(float),
setPivotX(Float)public float getPivotXFraction()
[0.0, 1.0] range.setPivotXFraction(float)public void setPivotYFraction(float fractionY)
setPivotY(Float).
Default value: 0.5
fractionY - The desired fraction from the [0.0, 1.0] range.getPivotXFraction(),
setPivotYFraction(float),
setPivotY(Float)public float getPivotYFraction()
[0.0, 1.0] range.setPivotYFraction(float)public android.animation.Animator onAppear(android.view.ViewGroup sceneRoot,
android.view.View view,
android.transition.TransitionValues startValues,
android.transition.TransitionValues endValues)
onAppear in class android.transition.Visibilitypublic android.animation.Animator onDisappear(android.view.ViewGroup sceneRoot,
android.view.View view,
android.transition.TransitionValues startValues,
android.transition.TransitionValues endValues)
onDisappear in class android.transition.Visibility