# OverScroller

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  
Summary:[Ctors](https://developer.android.com/reference/android/widget/OverScroller#pubctors)\|[Methods](https://developer.android.com/reference/android/widget/OverScroller#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/widget/OverScroller#inhmethods)  

# OverScroller

*** ** * ** ***

[Kotlin](https://developer.android.com/reference/kotlin/android/widget/OverScroller "View this page in Kotlin")\|Java

`
public


class
OverScroller
`  
`

extends `[Object](https://developer.android.com/reference/java/lang/Object)`


``


`

|---|-----------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.widget.OverScroller |

<br />

*** ** * ** ***

This class encapsulates scrolling with the ability to overshoot the bounds of a scrolling operation. This class is a drop-in replacement for[Scroller](https://developer.android.com/reference/android/widget/Scroller)in most cases.

## Summary

|                                                                                                                                                                                                                                                                                                                                                                  ### Public constructors                                                                                                                                                                                                                                                                                                                                                                   ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[OverScroller](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context))`(`[Context](https://developer.android.com/reference/android/content/Context)` context) ` Creates an OverScroller with a viscous fluid scroll interpolator and flywheel.                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ` `[OverScroller](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context,%20android.view.animation.Interpolator))`(`[Context](https://developer.android.com/reference/android/content/Context)` context, `[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator)` interpolator) ` Creates an OverScroller with flywheel enabled.                                                                                                                                                                                                                                                                                                                                 |
| ` `[OverScroller](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context,%20android.view.animation.Interpolator,%20float,%20float))`(`[Context](https://developer.android.com/reference/android/content/Context)` context, `[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator)` interpolator, float bounceCoefficientX, float bounceCoefficientY) ` *This constructor is deprecated. Use[OverScroller(android.content.Context, android.view.animation.Interpolator)](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context,%20android.view.animation.Interpolator))instead.*                              |
| ` `[OverScroller](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context,%20android.view.animation.Interpolator,%20float,%20float,%20boolean))`(`[Context](https://developer.android.com/reference/android/content/Context)` context, `[Interpolator](https://developer.android.com/reference/android/view/animation/Interpolator)` interpolator, float bounceCoefficientX, float bounceCoefficientY, boolean flywheel) ` *This constructor is deprecated. Use[OverScroller(android.content.Context, android.view.animation.Interpolator)](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context,%20android.view.animation.Interpolator))instead.* |

|                                                                                                                                                              ### Public methods                                                                                                                                                              ||
|------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` void`          | ` `[abortAnimation](https://developer.android.com/reference/android/widget/OverScroller#abortAnimation())`() ` Stops the animation.                                                                                                                                                                                        |
| ` boolean`       | ` `[computeScrollOffset](https://developer.android.com/reference/android/widget/OverScroller#computeScrollOffset())`() ` Call this when you want to know the new location.                                                                                                                                                 |
| ` void`          | ` `[fling](https://developer.android.com/reference/android/widget/OverScroller#fling(int,%20int,%20int,%20int,%20int,%20int,%20int,%20int))`(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY) `                                                                               |
| ` void`          | ` `[fling](https://developer.android.com/reference/android/widget/OverScroller#fling(int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int))`(int startX, int startY, int velocityX, int velocityY, int minX, int maxX, int minY, int maxY, int overX, int overY) ` Start scrolling based on a fling gesture. |
| ` final void`    | ` `[forceFinished](https://developer.android.com/reference/android/widget/OverScroller#forceFinished(boolean))`(boolean finished) ` Force the finished field to a particular value.                                                                                                                                        |
| ` float`         | ` `[getCurrVelocity](https://developer.android.com/reference/android/widget/OverScroller#getCurrVelocity())`() ` Returns the absolute value of the current velocity.                                                                                                                                                       |
| ` final int`     | ` `[getCurrX](https://developer.android.com/reference/android/widget/OverScroller#getCurrX())`() ` Returns the current X offset in the scroll.                                                                                                                                                                             |
| ` final int`     | ` `[getCurrY](https://developer.android.com/reference/android/widget/OverScroller#getCurrY())`() ` Returns the current Y offset in the scroll.                                                                                                                                                                             |
| ` final int`     | ` `[getFinalX](https://developer.android.com/reference/android/widget/OverScroller#getFinalX())`() ` Returns where the scroll will end.                                                                                                                                                                                    |
| ` final int`     | ` `[getFinalY](https://developer.android.com/reference/android/widget/OverScroller#getFinalY())`() ` Returns where the scroll will end.                                                                                                                                                                                    |
| ` final int`     | ` `[getStartX](https://developer.android.com/reference/android/widget/OverScroller#getStartX())`() ` Returns the start X offset in the scroll.                                                                                                                                                                             |
| ` final int`     | ` `[getStartY](https://developer.android.com/reference/android/widget/OverScroller#getStartY())`() ` Returns the start Y offset in the scroll.                                                                                                                                                                             |
| ` final boolean` | ` `[isFinished](https://developer.android.com/reference/android/widget/OverScroller#isFinished())`() ` Returns whether the scroller has finished scrolling.                                                                                                                                                                |
| ` boolean`       | ` `[isOverScrolled](https://developer.android.com/reference/android/widget/OverScroller#isOverScrolled())`() ` Returns whether the current Scroller is currently returning to a valid position.                                                                                                                            |
| ` void`          | ` `[notifyHorizontalEdgeReached](https://developer.android.com/reference/android/widget/OverScroller#notifyHorizontalEdgeReached(int,%20int,%20int))`(int startX, int finalX, int overX) ` Notify the scroller that we've reached a horizontal boundary.                                                                   |
| ` void`          | ` `[notifyVerticalEdgeReached](https://developer.android.com/reference/android/widget/OverScroller#notifyVerticalEdgeReached(int,%20int,%20int))`(int startY, int finalY, int overY) ` Notify the scroller that we've reached a vertical boundary.                                                                         |
| ` final void`    | ` `[setFriction](https://developer.android.com/reference/android/widget/OverScroller#setFriction(float))`(float friction) ` The amount of friction applied to flings.                                                                                                                                                      |
| ` boolean`       | ` `[springBack](https://developer.android.com/reference/android/widget/OverScroller#springBack(int,%20int,%20int,%20int,%20int,%20int))`(int startX, int startY, int minX, int maxX, int minY, int maxY) ` Call this when you want to 'spring back' into a valid coordinate range.                                         |
| ` void`          | ` `[startScroll](https://developer.android.com/reference/android/widget/OverScroller#startScroll(int,%20int,%20int,%20int,%20int))`(int startX, int startY, int dx, int dy, int duration) ` Start scrolling by providing a starting point and the distance to travel.                                                      |
| ` void`          | ` `[startScroll](https://developer.android.com/reference/android/widget/OverScroller#startScroll(int,%20int,%20int,%20int))`(int startX, int startY, int dx, int dy) ` Start scrolling by providing a starting point and the distance to travel.                                                                           |

| ### Inherited methods |
|-----------------------|---|
| From class` `[java.lang.Object](https://developer.android.com/reference/java/lang/Object)` ` |--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` `[Object](https://developer.android.com/reference/java/lang/Object)          | ` `[clone](https://developer.android.com/reference/java/lang/Object#clone())`() ` Creates and returns a copy of this object.                                                                                                                                                      | | ` boolean`                                                                     | ` `[equals](https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object))`(`[Object](https://developer.android.com/reference/java/lang/Object)` obj) ` Indicates whether some other object is "equal to" this one.                                           | | ` void`                                                                        | ` `[finalize](https://developer.android.com/reference/java/lang/Object#finalize())`() ` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.                                                          | | ` final `[Class](https://developer.android.com/reference/java/lang/Class)`<?>` | ` `[getClass](https://developer.android.com/reference/java/lang/Object#getClass())`() ` Returns the runtime class of this`Object`.                                                                                                                                                | | ` int`                                                                         | ` `[hashCode](https://developer.android.com/reference/java/lang/Object#hashCode())`() ` Returns a hash code value for the object.                                                                                                                                                 | | ` final void`                                                                  | ` `[notify](https://developer.android.com/reference/java/lang/Object#notify())`() ` Wakes up a single thread that is waiting on this object's monitor.                                                                                                                            | | ` final void`                                                                  | ` `[notifyAll](https://developer.android.com/reference/java/lang/Object#notifyAll())`() ` Wakes up all threads that are waiting on this object's monitor.                                                                                                                         | | ` `[String](https://developer.android.com/reference/java/lang/String)          | ` `[toString](https://developer.android.com/reference/java/lang/Object#toString())`() ` Returns a string representation of the object.                                                                                                                                            | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long,%20int))`(long timeoutMillis, int nanos) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed. | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait(long))`(long timeoutMillis) ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*, or until a certain amount of real time has elapsed.                   | | ` final void`                                                                  | ` `[wait](https://developer.android.com/reference/java/lang/Object#wait())`() ` Causes the current thread to wait until it is awakened, typically by being*notified* or*interrupted*.                                                                                             | ||

## Public constructors

### OverScroller

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public OverScroller (Context context)
```

Creates an OverScroller with a viscous fluid scroll interpolator and flywheel.

<br />

### OverScroller

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public OverScroller (Context context, 
                Interpolator interpolator)
```

Creates an OverScroller with flywheel enabled.

<br />

|                                                       Parameters                                                        ||
|----------------|---------------------------------------------------------------------------------------------------------|
| `context`      | `Context`: The context of this application. <br />                                                      |
| `interpolator` | `Interpolator`: The scroll interpolator. If null, a default (viscous) interpolator will be used. <br /> |

### OverScroller

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public OverScroller (Context context, 
                Interpolator interpolator, 
                float bounceCoefficientX, 
                float bounceCoefficientY)
```

<br />

**This constructor is deprecated.**   
Use[OverScroller(android.content.Context, android.view.animation.Interpolator)](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context,%20android.view.animation.Interpolator))instead.

Creates an OverScroller with flywheel enabled.

<br />

|                                                                                                                                          Parameters                                                                                                                                           ||
|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`            | `Context`: The context of this application. <br />                                                                                                                                                                                                                      |
| `interpolator`       | `Interpolator`: The scroll interpolator. If null, a default (viscous) interpolator will be used. <br />                                                                                                                                                                 |
| `bounceCoefficientX` | `float`: A value between 0 and 1 that will determine the proportion of the velocity which is preserved in the bounce when the horizontal edge is reached. A null value means no bounce. This behavior is no longer supported and this coefficient has no effect. <br /> |
| `bounceCoefficientY` | `float`: Same as bounceCoefficientX but for the vertical direction. This behavior is no longer supported and this coefficient has no effect. <br />                                                                                                                     |

### OverScroller

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public OverScroller (Context context, 
                Interpolator interpolator, 
                float bounceCoefficientX, 
                float bounceCoefficientY, 
                boolean flywheel)
```

<br />

**This constructor is deprecated.**   
Use[OverScroller(android.content.Context, android.view.animation.Interpolator)](https://developer.android.com/reference/android/widget/OverScroller#OverScroller(android.content.Context,%20android.view.animation.Interpolator))instead.

Creates an OverScroller.

<br />

|                                                                                                                                          Parameters                                                                                                                                           ||
|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `context`            | `Context`: The context of this application. <br />                                                                                                                                                                                                                      |
| `interpolator`       | `Interpolator`: The scroll interpolator. If null, a default (viscous) interpolator will be used. <br />                                                                                                                                                                 |
| `bounceCoefficientX` | `float`: A value between 0 and 1 that will determine the proportion of the velocity which is preserved in the bounce when the horizontal edge is reached. A null value means no bounce. This behavior is no longer supported and this coefficient has no effect. <br /> |
| `bounceCoefficientY` | `float`: Same as bounceCoefficientX but for the vertical direction. This behavior is no longer supported and this coefficient has no effect. <br />                                                                                                                     |
| `flywheel`           | `boolean`: If true, successive fling motions will keep on increasing scroll speed. <br />                                                                                                                                                                               |

## Public methods

### abortAnimation

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void abortAnimation ()
```

Stops the animation. Contrary to[forceFinished(boolean)](https://developer.android.com/reference/android/widget/OverScroller#forceFinished(boolean)), aborting the animating causes the scroller to move to the final x and y positions.

<br />

**See also:**

- [forceFinished(boolean)](https://developer.android.com/reference/android/widget/OverScroller#forceFinished(boolean))  

### computeScrollOffset

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean computeScrollOffset ()
```

Call this when you want to know the new location. If it returns true, the animation is not yet finished.

<br />

|      Returns      ||
|-----------|--------|
| `boolean` | <br /> |

### fling

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void fling (int startX, 
                int startY, 
                int velocityX, 
                int velocityY, 
                int minX, 
                int maxX, 
                int minY, 
                int maxY)
```

<br />

<br />

|        Parameters         ||
|-------------|--------------|
| `startX`    | `int` <br /> |
| `startY`    | `int` <br /> |
| `velocityX` | `int` <br /> |
| `velocityY` | `int` <br /> |
| `minX`      | `int` <br /> |
| `maxX`      | `int` <br /> |
| `minY`      | `int` <br /> |
| `maxY`      | `int` <br /> |

### fling

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void fling (int startX, 
                int startY, 
                int velocityX, 
                int velocityY, 
                int minX, 
                int maxX, 
                int minY, 
                int maxY, 
                int overX, 
                int overY)
```

Start scrolling based on a fling gesture. The distance traveled will depend on the initial velocity of the fling.

<br />

|                                                                                   Parameters                                                                                    ||
|-------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `startX`    | `int`: Starting point of the scroll (X) <br />                                                                                                                     |
| `startY`    | `int`: Starting point of the scroll (Y) <br />                                                                                                                     |
| `velocityX` | `int`: Initial velocity of the fling (X) measured in pixels per second. <br />                                                                                     |
| `velocityY` | `int`: Initial velocity of the fling (Y) measured in pixels per second <br />                                                                                      |
| `minX`      | `int`: Minimum X value. The scroller will not scroll past this point unless overX \> 0. If overfling is allowed, it will use minX as a springback boundary. <br /> |
| `maxX`      | `int`: Maximum X value. The scroller will not scroll past this point unless overX \> 0. If overfling is allowed, it will use maxX as a springback boundary. <br /> |
| `minY`      | `int`: Minimum Y value. The scroller will not scroll past this point unless overY \> 0. If overfling is allowed, it will use minY as a springback boundary. <br /> |
| `maxY`      | `int`: Maximum Y value. The scroller will not scroll past this point unless overY \> 0. If overfling is allowed, it will use maxY as a springback boundary. <br /> |
| `overX`     | `int`: Overfling range. If \> 0, horizontal overfling in either direction will be possible. <br />                                                                 |
| `overY`     | `int`: Overfling range. If \> 0, vertical overfling in either direction will be possible. <br />                                                                   |

### forceFinished

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final void forceFinished (boolean finished)
```

Force the finished field to a particular value. Contrary to[abortAnimation()](https://developer.android.com/reference/android/widget/OverScroller#abortAnimation()), forcing the animation to finished does NOT cause the scroller to move to the final x and y position.

<br />

|                      Parameters                       ||
|------------|-------------------------------------------|
| `finished` | `boolean`: The new finished value. <br /> |

### getCurrVelocity

Added in[API level 14](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public float getCurrVelocity ()
```

Returns the absolute value of the current velocity.

<br />

|                                              Returns                                              ||
|---------|------------------------------------------------------------------------------------------|
| `float` | The original velocity less the deceleration, norm of the X and Y velocity vector. <br /> |

### getCurrX

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final int getCurrX ()
```

Returns the current X offset in the scroll.

<br />

|                                 Returns                                 ||
|-------|------------------------------------------------------------------|
| `int` | The new X offset as an absolute distance from the origin. <br /> |

### getCurrY

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final int getCurrY ()
```

Returns the current Y offset in the scroll.

<br />

|                                 Returns                                 ||
|-------|------------------------------------------------------------------|
| `int` | The new Y offset as an absolute distance from the origin. <br /> |

### getFinalX

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final int getFinalX ()
```

Returns where the scroll will end. Valid only for "fling" scrolls.

<br />

|                                  Returns                                  ||
|-------|--------------------------------------------------------------------|
| `int` | The final X offset as an absolute distance from the origin. <br /> |

### getFinalY

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final int getFinalY ()
```

Returns where the scroll will end. Valid only for "fling" scrolls.

<br />

|                                  Returns                                  ||
|-------|--------------------------------------------------------------------|
| `int` | The final Y offset as an absolute distance from the origin. <br /> |

### getStartX

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final int getStartX ()
```

Returns the start X offset in the scroll.

<br />

|                                  Returns                                  ||
|-------|--------------------------------------------------------------------|
| `int` | The start X offset as an absolute distance from the origin. <br /> |

### getStartY

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final int getStartY ()
```

Returns the start Y offset in the scroll.

<br />

|                                  Returns                                  ||
|-------|--------------------------------------------------------------------|
| `int` | The start Y offset as an absolute distance from the origin. <br /> |

### isFinished

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final boolean isFinished ()
```

Returns whether the scroller has finished scrolling.

<br />

|                                     Returns                                     ||
|-----------|----------------------------------------------------------------------|
| `boolean` | True if the scroller has finished scrolling, false otherwise. <br /> |

### isOverScrolled

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean isOverScrolled ()
```

Returns whether the current Scroller is currently returning to a valid position. Valid bounds were provided by the[fling(int, int, int, int, int, int, int, int, int, int)](https://developer.android.com/reference/android/widget/OverScroller#fling(int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int,%20int))method. One should check this value before calling[startScroll(int, int, int, int)](https://developer.android.com/reference/android/widget/OverScroller#startScroll(int,%20int,%20int,%20int))as the interpolation currently in progress to restore a valid position will then be stopped. The caller has to take into account the fact that the started scroll will start from an overscrolled position.

<br />

|                                                           Returns                                                           ||
|-----------|------------------------------------------------------------------------------------------------------------------|
| `boolean` | true when the current position is overscrolled and in the process of interpolating back to a valid value. <br /> |

### notifyHorizontalEdgeReached

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void notifyHorizontalEdgeReached (int startX, 
                int finalX, 
                int overX)
```

Notify the scroller that we've reached a horizontal boundary. Normally the information to handle this will already be known when the animation is started, such as in a call to one of the fling functions. However there are cases where this cannot be known in advance. This function will transition the current motion and animate from startX to finalX as appropriate.

<br />

|                                                                      Parameters                                                                      ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `startX` | `int`: Starting/current X position <br />                                                                                                  |
| `finalX` | `int`: Desired final X position <br />                                                                                                     |
| `overX`  | `int`: Magnitude of overscroll allowed. This should be the maximum desired distance from finalX. Absolute value - must be positive. <br /> |

### notifyVerticalEdgeReached

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void notifyVerticalEdgeReached (int startY, 
                int finalY, 
                int overY)
```

Notify the scroller that we've reached a vertical boundary. Normally the information to handle this will already be known when the animation is started, such as in a call to one of the fling functions. However there are cases where this cannot be known in advance. This function will animate a parabolic motion from startY to finalY.

<br />

|                                                                      Parameters                                                                      ||
|----------|--------------------------------------------------------------------------------------------------------------------------------------------|
| `startY` | `int`: Starting/current Y position <br />                                                                                                  |
| `finalY` | `int`: Desired final Y position <br />                                                                                                     |
| `overY`  | `int`: Magnitude of overscroll allowed. This should be the maximum desired distance from finalY. Absolute value - must be positive. <br /> |

### setFriction

Added in[API level 11](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public final void setFriction (float friction)
```

The amount of friction applied to flings. The default value is[ViewConfiguration.getScrollFriction](https://developer.android.com/reference/android/view/ViewConfiguration#getScrollFriction()).

<br />

|                                             Parameters                                              ||
|------------|-----------------------------------------------------------------------------------------|
| `friction` | `float`: A scalar dimension-less value representing the coefficient of friction. <br /> |

### springBack

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public boolean springBack (int startX, 
                int startY, 
                int minX, 
                int maxX, 
                int minY, 
                int maxY)
```

Call this when you want to 'spring back' into a valid coordinate range.

<br />

|                  Parameters                   ||
|----------|-------------------------------------|
| `startX` | `int`: Starting X coordinate <br /> |
| `startY` | `int`: Starting Y coordinate <br /> |
| `minX`   | `int`: Minimum valid X value <br /> |
| `maxX`   | `int`: Maximum valid X value <br /> |
| `minY`   | `int`: Minimum valid Y value <br /> |
| `maxY`   | `int`: Minimum valid Y value <br /> |

|                                                        Returns                                                        ||
|-----------|------------------------------------------------------------------------------------------------------------|
| `boolean` | true if a springback was initiated, false if startX and startY were already within the valid range. <br /> |

### startScroll

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void startScroll (int startX, 
                int startY, 
                int dx, 
                int dy, 
                int duration)
```

Start scrolling by providing a starting point and the distance to travel.

<br />

|                                                          Parameters                                                          ||
|------------|------------------------------------------------------------------------------------------------------------------|
| `startX`   | `int`: Starting horizontal scroll offset in pixels. Positive numbers will scroll the content to the left. <br /> |
| `startY`   | `int`: Starting vertical scroll offset in pixels. Positive numbers will scroll the content up. <br />            |
| `dx`       | `int`: Horizontal distance to travel. Positive numbers will scroll the content to the left. <br />               |
| `dy`       | `int`: Vertical distance to travel. Positive numbers will scroll the content up. <br />                          |
| `duration` | `int`: Duration of the scroll in milliseconds. <br />                                                            |

### startScroll

Added in[API level 9](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)  

```
public void startScroll (int startX, 
                int startY, 
                int dx, 
                int dy)
```

Start scrolling by providing a starting point and the distance to travel. The scroll will use the default value of 250 milliseconds for the duration.

<br />

|                                                         Parameters                                                         ||
|----------|------------------------------------------------------------------------------------------------------------------|
| `startX` | `int`: Starting horizontal scroll offset in pixels. Positive numbers will scroll the content to the left. <br /> |
| `startY` | `int`: Starting vertical scroll offset in pixels. Positive numbers will scroll the content up. <br />            |
| `dx`     | `int`: Horizontal distance to travel. Positive numbers will scroll the content to the left. <br />               |
| `dy`     | `int`: Vertical distance to travel. Positive numbers will scroll the content up. <br />                          |