Added in [API level 8](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Methods](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#pubmethods)

# ScaleGestureDetector.OnScaleGestureListener

*** ** * ** ***

` public static interface ScaleGestureDetector.OnScaleGestureListener `   
` `

|---|
| android.view.ScaleGestureDetector.OnScaleGestureListener |

Known indirect subclasses [ScaleGestureDetector.SimpleOnScaleGestureListener](https://developer.android.com/reference/android/view/ScaleGestureDetector.SimpleOnScaleGestureListener) [ScaleGestureDetector.SimpleOnScaleGestureListener](https://developer.android.com/reference/android/view/ScaleGestureDetector.SimpleOnScaleGestureListener) A convenience class to extend when you only want to listen for a subset of scaling-related events.   

*** ** * ** ***

The listener for receiving notifications when gestures occur. If you want to listen for all the different gestures then implement this interface. If you only want to listen for a subset it might be easier to extend `https://developer.android.com/reference/android/view/ScaleGestureDetector.SimpleOnScaleGestureListener`. An application will receive events in the following order:

- One `https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScaleBegin(android.view.ScaleGestureDetector)`
- Zero or more `https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScale(android.view.ScaleGestureDetector)`
- One `https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScaleEnd(android.view.ScaleGestureDetector)`

<br />

## Summary

| ### Public methods ||
|---|---|
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScale(android.view.ScaleGestureDetector)(https://developer.android.com/reference/android/view/ScaleGestureDetector detector) ` Responds to scaling events for a gesture in progress. |
| ` abstract boolean` | ` https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScaleBegin(android.view.ScaleGestureDetector)(https://developer.android.com/reference/android/view/ScaleGestureDetector detector) ` Responds to the beginning of a scaling gesture. |
| ` abstract void` | ` https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScaleEnd(android.view.ScaleGestureDetector)(https://developer.android.com/reference/android/view/ScaleGestureDetector detector) ` Responds to the end of a scale gesture. |

## Public methods

### onScale

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

```
public abstract boolean onScale (ScaleGestureDetector detector)
```

Responds to scaling events for a gesture in progress. Reported by pointer motion.

<br />

| Parameters ||
|---|---|
| `detector` | `ScaleGestureDetector`: The detector reporting the event - use this to retrieve extended info about event state. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | Whether or not the detector should consider this event as handled. If an event was not handled, the detector will continue to accumulate movement until an event is handled. This can be useful if an application, for example, only wants to update scaling factors if the change is greater than 0.01. <br /> |

### onScaleBegin

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

```
public abstract boolean onScaleBegin (ScaleGestureDetector detector)
```

Responds to the beginning of a scaling gesture. Reported by new pointers going down.

<br />

| Parameters ||
|---|---|
| `detector` | `ScaleGestureDetector`: The detector reporting the event - use this to retrieve extended info about event state. This value cannot be `null`. <br /> |

| Returns ||
|---|---|
| `boolean` | Whether or not the detector should continue recognizing this gesture. For example, if a gesture is beginning with a focal point outside of a region where it makes sense, onScaleBegin() may return false to ignore the rest of the gesture. <br /> |

### onScaleEnd

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

```
public abstract void onScaleEnd (ScaleGestureDetector detector)
```

Responds to the end of a scale gesture. Reported by existing pointers going up. Once a scale has ended, `https://developer.android.com/reference/android/view/ScaleGestureDetector#getFocusX()` and `https://developer.android.com/reference/android/view/ScaleGestureDetector#getFocusY()` will return focal point of the pointers remaining on the screen.

<br />

| Parameters ||
|---|---|
| `detector` | `ScaleGestureDetector`: The detector reporting the event - use this to retrieve extended info about event state. This value cannot be `null`. <br /> |