- Sceneform SDK for Android
was open sourced and archived ( github.com/google-ar/sceneform-android-sdk
) with version 1.16.0.
- This site ( developers.google.com/sceneform
) serves as the documentation archive for the previous version, Sceneform SDK for Android
1.15.0.
- Do not use version 1.17.0 of the Sceneform Maven artifacts
.
- The 1.17.1 Maven artifacts can be used. Other than the version, however, the 1.17.1 artifacts are identical to the 1.15.0 artifacts.
DragGesture
Stay organized with collections
Save and categorize content based on your preferences.
Gesture for when the user performs a drag motion on the touch screen.
Nested Classes
interface
Interface definition for callbacks to be invoked by a DragGesture
.
Inherited Methods
From class
java.lang.Object
Public Constructors
Parameters
gesturePointersUtility |
hitTestResult |
motionEvent |
Protected Methods
protected
void
onCancel
()
protected
void
onFinish
()
protected
boolean
updateGesture
( HitTestResult
hitTestResult, MotionEvent
motionEvent)
Parameters
hitTestResult |
motionEvent |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License
, and code samples are licensed under the Apache 2.0 License
. For details, see the Google Developers Site Policies
. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-26 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-06-26 UTC."],[[["\u003cp\u003e\u003ccode\u003eDragGesture\u003c/code\u003e is a class in Sceneform that detects and handles user drag motions on the touchscreen.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to get the drag delta (\u003ccode\u003egetDelta\u003c/code\u003e) and current position (\u003ccode\u003egetPosition\u003c/code\u003e) of the drag gesture.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can use the \u003ccode\u003eOnGestureEventListener\u003c/code\u003e interface to receive callbacks during the drag gesture lifecycle (start, update, finish, cancel).\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eDragGesture\u003c/code\u003e inherits from \u003ccode\u003eBaseGesture\u003c/code\u003e and provides its own implementations for gesture handling.\u003c/p\u003e\n"]]],["`DragGesture` manages drag motions on a touchscreen. It utilizes `GesturePointersUtility`, `HitTestResult`, and `MotionEvent` for its constructor. Key actions include determining if a drag can start (`canStart`), starting a drag (`onStart`), updating the drag (`updateGesture`), and managing the drag's completion (`onFinish`, `onCancel`). It provides methods to obtain the change in the position(`getDelta`) and the current position of the drag (`getPosition`). The `OnGestureEventListener` interface allows for external callback handling.\n"],null,[]]