Stay organized with collections
Save and categorize content based on your preferences.
SimpleOnScaleGestureListener
open class SimpleOnScaleGestureListener : ScaleGestureDetector.OnScaleGestureListener
A convenience class to extend when you only want to listen for a subset of scaling-related events. This implements all methods in OnScaleGestureListener
but does nothing. OnScaleGestureListener#onScale(ScaleGestureDetector)
returns false
so that a subclass can retrieve the accumulated scale factor in an overridden onScaleEnd. OnScaleGestureListener#onScaleBegin(ScaleGestureDetector)
returns true
.
Summary
Public methods |
open Boolean |
Responds to scaling events for a gesture in progress.
|
open Boolean |
Responds to the beginning of a scaling gesture.
|
open Unit |
Responds to the end of a scale gesture.
|
Public constructors
SimpleOnScaleGestureListener
SimpleOnScaleGestureListener()
Public methods
onScale
open fun onScale(detector: ScaleGestureDetector): Boolean
Responds to scaling events for a gesture in progress. Reported by pointer motion.
Return |
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. |
onScaleBegin
open fun onScaleBegin(detector: ScaleGestureDetector): Boolean
Responds to the beginning of a scaling gesture. Reported by new pointers going down.
Return |
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. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-04 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-04 UTC."],[],[]]