com.davemorrissey.labs.subscaleview

## Class SubsamplingScaleImageView.AnimationBuilder

- java.lang.Object
- - com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView.AnimationBuilder

Enclosing class:
  SubsamplingScaleImageView

    public final class SubsamplingScaleImageView.AnimationBuilder
    extends Object

Builder class used to set additional options for a scale animation. Create an instance using `SubsamplingScaleImageView.animateScale(float)`, then set your options and call `start()`.

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `start()` Starts the animation.
`SubsamplingScaleImageView.AnimationBuilder` `withDuration(long duration)` Desired duration of the anim in milliseconds.
`SubsamplingScaleImageView.AnimationBuilder` `withEasing(int easing)` Set the easing style.
`SubsamplingScaleImageView.AnimationBuilder` `withInterruptible(boolean interruptible)` Whether the animation can be interrupted with a touch.
`SubsamplingScaleImageView.AnimationBuilder` `withOnAnimationEventListener(SubsamplingScaleImageView.OnAnimationEventListener listener)` Add an animation event listener.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### withDuration

    @NonNull
    public SubsamplingScaleImageView.AnimationBuilder withDuration(long duration)

Desired duration of the anim in milliseconds. Default is 500.

Parameters:
  `duration` - duration in milliseconds.
Returns:
  this builder for method chaining.

#### withInterruptible

    @NonNull
    public SubsamplingScaleImageView.AnimationBuilder withInterruptible(boolean interruptible)

Whether the animation can be interrupted with a touch. Default is true.

Parameters:
  `interruptible` - interruptible flag.
Returns:
  this builder for method chaining.

#### withEasing

    @NonNull
    public SubsamplingScaleImageView.AnimationBuilder withEasing(int easing)

Set the easing style. See static fields. `SubsamplingScaleImageView.EASE_IN_OUT_QUAD` is recommended, and the default.

Parameters:
  `easing` - easing style.
Returns:
  this builder for method chaining.

#### withOnAnimationEventListener

    @NonNull
    public SubsamplingScaleImageView.AnimationBuilder withOnAnimationEventListener(SubsamplingScaleImageView.OnAnimationEventListener listener)

Add an animation event listener.

Parameters:
  `listener` - The listener.
Returns:
  this builder for method chaining.

#### start

    public void start()

Starts the animation.