|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.simonvt.menudrawer.FloatScroller
public class FloatScroller
This class encapsulates scrolling. The duration of the scroll can be passed in the constructor and specifies the maximum time that the scrolling animation should take. Past this time, the scrolling is automatically moved to its final stage and computeScrollOffset() will always return false to indicate that scrolling is over.
| Constructor Summary | |
|---|---|
FloatScroller(android.view.animation.Interpolator interpolator)
Create a Scroller with the specified interpolator. |
|
| Method Summary | |
|---|---|
void |
abortAnimation()
Stops the animation. |
boolean |
computeScrollOffset()
|
void |
extendDuration(int extend)
Extend the scroll animation. |
void |
forceFinished(boolean finished)
Force the finished field to a particular value. |
float |
getCurr()
Returns the current offset in the scroll. |
int |
getDuration()
Returns how long the scroll event will take, in milliseconds. |
float |
getFinal()
Returns where the scroll will end. |
float |
getStart()
Returns the start offset in the scroll. |
boolean |
isFinished()
Returns whether the scroller has finished scrolling. |
void |
setFinal(float newVal)
|
void |
startScroll(float start,
float delta,
int duration)
|
int |
timePassed()
Returns the time elapsed since the beginning of the scrolling. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FloatScroller(android.view.animation.Interpolator interpolator)
| Method Detail |
|---|
public final boolean isFinished()
public final void forceFinished(boolean finished)
finished - The new finished value.public final int getDuration()
public final float getCurr()
public final float getStart()
public final float getFinal()
public boolean computeScrollOffset()
public void startScroll(float start,
float delta,
int duration)
public void abortAnimation()
forceFinished(boolean),
aborting the animating cause the scroller to move to the final x and y
position
forceFinished(boolean)public void extendDuration(int extend)
setFinal(float).
extend - Additional time to scroll in milliseconds.setFinal(float)public int timePassed()
public void setFinal(float newVal)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||