# ScaleGestureDetector.SimpleOnScaleGestureListener

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

# ScaleGestureDetector.SimpleOnScaleGestureListener

*** ** * ** ***

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


`
public
static


class
ScaleGestureDetector.SimpleOnScaleGestureListener
`


`

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


`

`


implements

`[ScaleGestureDetector.OnScaleGestureListener](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener)`


`

|---|----------------------------------------------------------------|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.view.ScaleGestureDetector.SimpleOnScaleGestureListener |

<br />

*** ** * ** ***

A convenience class to extend when you only want to listen for a subset
of scaling-related events. This implements all methods in
[OnScaleGestureListener](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener) but does nothing.
[OnScaleGestureListener.onScale(ScaleGestureDetector)](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScale(android.view.ScaleGestureDetector)) returns
`false` so that a subclass can retrieve the accumulated scale
factor in an overridden onScaleEnd.
[OnScaleGestureListener.onScaleBegin(ScaleGestureDetector)](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScaleBegin(android.view.ScaleGestureDetector)) returns
`true`.

## Summary

|                                                                             ### Public constructors                                                                              ||
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[SimpleOnScaleGestureListener](https://developer.android.com/reference/android/view/ScaleGestureDetector.SimpleOnScaleGestureListener#SimpleOnScaleGestureListener())`() ` |

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

| ### 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*.                                                                                             | ||
| From interface ` `[android.view.ScaleGestureDetector.OnScaleGestureListener](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener)` ` |---------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract boolean` | ` `[onScale](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScale(android.view.ScaleGestureDetector))`(`[ScaleGestureDetector](https://developer.android.com/reference/android/view/ScaleGestureDetector)` detector) ` Responds to scaling events for a gesture in progress.     | | ` abstract boolean` | ` `[onScaleBegin](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScaleBegin(android.view.ScaleGestureDetector))`(`[ScaleGestureDetector](https://developer.android.com/reference/android/view/ScaleGestureDetector)` detector) ` Responds to the beginning of a scaling gesture. | | ` abstract void`    | ` `[onScaleEnd](https://developer.android.com/reference/android/view/ScaleGestureDetector.OnScaleGestureListener#onScaleEnd(android.view.ScaleGestureDetector))`(`[ScaleGestureDetector](https://developer.android.com/reference/android/view/ScaleGestureDetector)` detector) ` Responds to the end of a scale gesture.             | ||

## Public constructors

### SimpleOnScaleGestureListener

```
public SimpleOnScaleGestureListener ()
```

<br />

<br />

## Public methods

### onScale

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

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

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

<br />

|                               Parameters                                ||
|------------|-------------------------------------------------------------|
| `detector` | `ScaleGestureDetector`: 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 boolean onScaleBegin (ScaleGestureDetector detector)
```

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

<br />

|                               Parameters                                ||
|------------|-------------------------------------------------------------|
| `detector` | `ScaleGestureDetector`: 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 void onScaleEnd (ScaleGestureDetector detector)
```

Responds to the end of a scale gesture. Reported by existing
pointers going up.

Once a scale has ended, [ScaleGestureDetector.getFocusX()](https://developer.android.com/reference/android/view/ScaleGestureDetector#getFocusX())
and [ScaleGestureDetector.getFocusY()](https://developer.android.com/reference/android/view/ScaleGestureDetector#getFocusY()) will return focal point
of the pointers remaining on the screen.

<br />

|                               Parameters                                ||
|------------|-------------------------------------------------------------|
| `detector` | `ScaleGestureDetector`: This value cannot be `null`. <br /> |