Most visited

Recently visited

Added in API level 24

GestureDescription.StrokeDescription

public static class GestureDescription.StrokeDescription
extends Object

java.lang.Object
   ↳ android.accessibilityservice.GestureDescription.StrokeDescription


Immutable description of stroke that can be part of a gesture.

Summary

Public constructors

GestureDescription.StrokeDescription(Path path, long startTime, long duration)

Public methods

long getDuration()

Get the stroke's duration

Path getPath()

Retrieve a copy of the path for this stroke

long getStartTime()

Get the stroke's start time

Inherited methods

From class java.lang.Object

Public constructors

GestureDescription.StrokeDescription

Added in API level 24
GestureDescription.StrokeDescription (Path path, 
                long startTime, 
                long duration)

Parameters
path Path: The path to follow. Must have exactly one contour. The bounds of the path must not be negative. The path must not be empty. If the path has zero length (for example, a single moveTo()), the stroke is a touch that doesn't move.
startTime long: The time, in milliseconds, from the time the gesture starts to the time the stroke should start. Must not be negative.
duration long: The duration, in milliseconds, the stroke takes to traverse the path. Must not be negative.

Public methods

getDuration

Added in API level 24
long getDuration ()

Get the stroke's duration

Returns
long the duration for this stroke

getPath

Added in API level 24
Path getPath ()

Retrieve a copy of the path for this stroke

Returns
Path A copy of the path

getStartTime

Added in API level 24
long getStartTime ()

Get the stroke's start time

Returns
long the start time for this stroke.

Hooray!