public class NacHeightAnimator
extends android.animation.ValueAnimator
implements android.animation.ValueAnimator.AnimatorUpdateListener
Modifier and Type | Class and Description |
---|---|
static interface |
NacHeightAnimator.OnAnimateHeightListener
Listener for when the view's height is changing.
|
Modifier and Type | Field and Description |
---|---|
protected int |
mFromHeight
The height to start with.
|
protected NacHeightAnimator.OnAnimateHeightListener |
mOnAnimateHeightListener
Listener for when the view's height is changing.
|
protected int |
mToHeight
The height to end with.
|
protected int |
mUpdateCounter
Count the number of times the animation has updated.
|
protected android.view.View |
mView
The view to slide.
|
Constructor and Description |
---|
NacHeightAnimator(android.view.View view) |
NacHeightAnimator(android.view.View view,
int fromHeight,
int toHeight) |
Modifier and Type | Method and Description |
---|---|
void |
callOnAnimateCollapseListener()
Call the listener for when the view is collapsing.
|
void |
callOnAnimateExpandListener()
Call the listener for when the view is expanding.
|
int |
getAnimatedHeight() |
int |
getFromHeight() |
protected NacHeightAnimator.OnAnimateHeightListener |
getOnAnimateHeightListener() |
int |
getToHeight() |
int |
getUpdateCounter() |
android.view.View |
getView() |
boolean |
isCollapsing() |
boolean |
isExpanding() |
boolean |
isFirstUpdate() |
boolean |
isLastUpdate() |
void |
onAnimationUpdate(android.animation.ValueAnimator animation)
Update the height of the view.
|
void |
setHeights(int fromHeight,
int toHeight)
Set the heights.
|
void |
setOnAnimateHeightListener(NacHeightAnimator.OnAnimateHeightListener listener)
Set the listener for when the view's height is changing.
|
void |
setView(android.view.View view)
Set the view.
|
void |
start()
Start the animation.
|
addUpdateListener, areAnimatorsEnabled, cancel, clone, end, getAnimatedFraction, getAnimatedValue, getAnimatedValue, getCurrentPlayTime, getDuration, getFrameDelay, getInterpolator, getRepeatCount, getRepeatMode, getStartDelay, getTotalDuration, getValues, isRunning, isStarted, ofArgb, ofFloat, ofInt, ofObject, ofPropertyValuesHolder, pause, removeAllUpdateListeners, removeUpdateListener, resume, reverse, setCurrentFraction, setCurrentPlayTime, setDuration, setEvaluator, setFloatValues, setFrameDelay, setInterpolator, setIntValues, setObjectValues, setRepeatCount, setRepeatMode, setStartDelay, setValues, toString
protected android.view.View mView
protected int mFromHeight
protected int mToHeight
protected int mUpdateCounter
protected NacHeightAnimator.OnAnimateHeightListener mOnAnimateHeightListener
public NacHeightAnimator(android.view.View view)
public NacHeightAnimator(android.view.View view, int fromHeight, int toHeight)
public void callOnAnimateCollapseListener()
public void callOnAnimateExpandListener()
public int getAnimatedHeight()
public int getFromHeight()
protected NacHeightAnimator.OnAnimateHeightListener getOnAnimateHeightListener()
public int getToHeight()
public int getUpdateCounter()
public android.view.View getView()
public boolean isCollapsing()
public boolean isExpanding()
public boolean isFirstUpdate()
public boolean isLastUpdate()
public void onAnimationUpdate(android.animation.ValueAnimator animation)
onAnimationUpdate
in interface android.animation.ValueAnimator.AnimatorUpdateListener
public void setHeights(int fromHeight, int toHeight)
public void setOnAnimateHeightListener(NacHeightAnimator.OnAnimateHeightListener listener)
public void setView(android.view.View view)
public void start()
start
in class android.animation.ValueAnimator