public class HighlightAnimation extends Animation
DIRECTION_DOWN, DIRECTION_LEFT, DIRECTION_RIGHT, DIRECTION_UP, DURATION_DEFAULT, DURATION_LONG, DURATION_SHORT
Constructor and Description |
---|
HighlightAnimation(View view)
This animation makes use of a translucent box to overlay the view before
animating its alpha property to mimic the highlighting of the view.
|
Modifier and Type | Method and Description |
---|---|
void |
animate()
This method animates the properties of the view specific to the Animation
object.
|
int |
getColor() |
long |
getDuration() |
TimeInterpolator |
getInterpolator() |
AnimationListener |
getListener() |
HighlightAnimation |
setColor(int color) |
HighlightAnimation |
setDuration(long duration) |
HighlightAnimation |
setInterpolator(TimeInterpolator interpolator) |
HighlightAnimation |
setListener(AnimationListener listener) |
public HighlightAnimation(View view)
color
- the color of the highlightduration
- the duration of the entire animationlistener
- the AnimationListener of animation @see
AnimationListener
public void animate()
Animation
public int getColor()
android.graphics.Color
public HighlightAnimation setColor(int color)
color
- The color of the highlight to set.android.graphics.Color
public TimeInterpolator getInterpolator()
public HighlightAnimation setInterpolator(TimeInterpolator interpolator)
interpolator
- The interpolator of the entire animation to set.public long getDuration()
public HighlightAnimation setDuration(long duration)
duration
- The duration of the entire animation to set.public AnimationListener getListener()
public HighlightAnimation setListener(AnimationListener listener)
listener
- The listener to set for the end of the animation.