com.davemorrissey.labs.subscaleview

## Interface SubsamplingScaleImageView.OnStateChangedListener

All Known Implementing Classes:
  SubsamplingScaleImageView.DefaultOnStateChangedListener

Enclosing class:
  SubsamplingScaleImageView

    public static interface SubsamplingScaleImageView.OnStateChangedListener

An event listener, allowing activities to be notified of pan and zoom events. Initialisation and calls made by your code do not trigger events; touch events and animations do. Methods in this listener will be called on the UI thread and may be called very frequently - your implementation should return quickly.

### Method Summary

All Methods Instance Methods Abstract Methods
`void` `onCenterChanged(PointF newCenter, int origin)` The source center has been changed.
`void` `onScaleChanged(float newScale, int origin)` The scale has changed.

### Method Detail

#### onScaleChanged

    void onScaleChanged(float newScale,
                        int origin)

The scale has changed. Use with `SubsamplingScaleImageView.getMaxScale()` and `SubsamplingScaleImageView.getMinScale()` to determine whether the image is fully zoomed in or out.

Parameters:
  `newScale` - The new scale.
  `origin` - Where the event originated from - one of `SubsamplingScaleImageView.ORIGIN_ANIM`, `SubsamplingScaleImageView.ORIGIN_TOUCH`.

#### onCenterChanged

    void onCenterChanged(PointF newCenter,
                         int origin)

The source center has been changed. This can be a result of panning or zooming.

Parameters:
  `newCenter` - The new source center point.
  `origin` - Where the event originated from - one of `SubsamplingScaleImageView.ORIGIN_ANIM`, `SubsamplingScaleImageView.ORIGIN_TOUCH`.