Added in API level 4

GestureOverlayView


open class GestureOverlayView : FrameLayout
kotlin.Any
   ↳ android.view.View
   ↳ android.view.ViewGroup
   ↳ android.widget.FrameLayout
   ↳ android.gesture.GestureOverlayView

A transparent overlay for gesture input that can be placed on top of other widgets or contain other widgets.

Summary

Nested classes
abstract

abstract

abstract

XML attributes
android:eventsInterceptionEnabled Defines whether the overlay should intercept the motion events when a gesture is recognized.
android:fadeDuration Duration, in milliseconds, of the fade out effect after the user is done drawing a gesture.
android:fadeEnabled Defines whether the gesture will automatically fade out after being recognized.
android:fadeOffset Time, in milliseconds, to wait before the gesture fades out after the user is done drawing it.
android:gestureColor Color used to draw a gesture.
android:gestureStrokeAngleThreshold Minimum curve angle a stroke must contain before it is recognized as a gesture.
android:gestureStrokeLengthThreshold Minimum length of a stroke before it is recognized as a gesture.
android:gestureStrokeSquarenessThreshold Squareness threshold of a stroke before it is recognized as a gesture.
android:gestureStrokeType Defines the type of strokes that define a gesture.
android:gestureStrokeWidth Width of the stroke used to draw the gesture.
android:orientation Indicates whether horizontal (when the orientation is vertical) or vertical (when orientation is horizontal) strokes automatically define a gesture.
android:uncertainGestureColor Color used to draw the user's strokes until we are sure it's a gesture.
Inherited XML attributes
Constants
static Int

static Int

static Int

static Int

Inherited constants
Public constructors

GestureOverlayView(context: Context!, attrs: AttributeSet!, defStyleAttr: Int)

GestureOverlayView(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int)

Public methods
open Unit

open Unit

open Unit

open Unit

open Unit

open Unit
clear(animated: Boolean)

open Boolean

open Unit
draw(canvas: Canvas)

open ArrayList<GesturePoint!>!

open Long

open Gesture!

open Int

open Path!

open Path!

open Float

open Float

open Float

open Int

open Float

open Int

open Int

open Boolean

open Boolean

open Boolean

open Boolean

open Unit

open Unit

open Unit

open Unit

open Unit

open Unit

open Unit

open Unit
setFadeEnabled(fadeEnabled: Boolean)

open Unit
setFadeOffset(fadeOffset: Long)

open Unit
setGesture(gesture: Gesture!)

open Unit

open Unit
setGestureStrokeAngleThreshold(gestureStrokeAngleThreshold: Float)

open Unit
setGestureStrokeLengthThreshold(gestureStrokeLengthThreshold: Float)

open Unit
setGestureStrokeSquarenessTreshold(gestureStrokeSquarenessTreshold: Float)

open Unit
setGestureStrokeType(gestureStrokeType: Int)

open Unit
setGestureStrokeWidth(gestureStrokeWidth: Float)

open Unit

open Unit
setOrientation(orientation: Int)

open Unit

Protected methods
open Unit

Inherited functions
Inherited properties

XML attributes

android:eventsInterceptionEnabled

android:eventsInterceptionEnabled
Defines whether the overlay should intercept the motion events when a gesture is recognized.

May be a boolean value, such as "true" or "false".

android:fadeDuration

android:fadeDuration
Duration, in milliseconds, of the fade out effect after the user is done drawing a gesture.

May be an integer value, such as "100".

android:fadeEnabled

android:fadeEnabled
Defines whether the gesture will automatically fade out after being recognized.

May be a boolean value, such as "true" or "false".

android:fadeOffset

android:fadeOffset
Time, in milliseconds, to wait before the gesture fades out after the user is done drawing it.

May be an integer value, such as "100".

android:gestureColor

android:gestureColor
Color used to draw a gesture.

May be a color value, in the form of "rgb", "argb", "rrggbb", or "aarrggbb".

android:gestureStrokeAngleThreshold

android:gestureStrokeAngleThreshold
Minimum curve angle a stroke must contain before it is recognized as a gesture.

May be a floating point value, such as "1.2".

android:gestureStrokeLengthThreshold

android:gestureStrokeLengthThreshold
Minimum length of a stroke before it is recognized as a gesture.

May be a floating point value, such as "1.2".

android:gestureStrokeSquarenessThreshold

android:gestureStrokeSquarenessThreshold
Squareness threshold of a stroke before it is recognized as a gesture.

May be a floating point value, such as "1.2".

android:gestureStrokeType

android:gestureStrokeType
Defines the type of strokes that define a gesture.

Must be one of the following constant values.

Constant Value Description
multiple 1 A gesture is made of multiple strokes.
single 0 A gesture is made of only one stroke.

android:gestureStrokeWidth

android:gestureStrokeWidth
Width of the stroke used to draw the gesture.

May be a floating point value, such as "1.2".

android:orientation

android:orientation
Indicates whether horizontal (when the orientation is vertical) or vertical (when orientation is horizontal) strokes automatically define a gesture.

Must be one of the following constant values.

Constant Value Description
horizontal 0 Defines an horizontal widget.
vertical 1 Defines a vertical widget.

android:uncertainGestureColor

android:uncertainGestureColor
Color used to draw the user's strokes until we are sure it's a gesture.

May be a color value, in the form of "rgb", "argb", "rrggbb", or "aarrggbb".

Constants

GESTURE_STROKE_TYPE_MULTIPLE

Added in API level 4
static val GESTURE_STROKE_TYPE_MULTIPLE: Int
Value: 1

GESTURE_STROKE_TYPE_SINGLE

Added in API level 4
static val GESTURE_STROKE_TYPE_SINGLE: Int
Value: 0

ORIENTATION_HORIZONTAL

Added in API level 4
static val ORIENTATION_HORIZONTAL: Int
Value: 0

ORIENTATION_VERTICAL

Added in API level 4
static val ORIENTATION_VERTICAL: Int
Value: 1

Public constructors

GestureOverlayView

Added in API level 4
GestureOverlayView(context: Context!)

GestureOverlayView

Added in API level 4
GestureOverlayView(
    context: Context!,
    attrs: AttributeSet!)

GestureOverlayView

Added in API level 4
GestureOverlayView(
    context: Context!,
    attrs: AttributeSet!,
    defStyleAttr: Int)

GestureOverlayView

Added in API level 21
GestureOverlayView(
    context: Context!,
    attrs: AttributeSet!,
    defStyleAttr: Int,
    defStyleRes: Int)

Public methods

addOnGestureListener

Added in API level 4
open fun addOnGestureListener(listener: GestureOverlayView.OnGestureListener!): Unit

addOnGesturePerformedListener

Added in API level 4
open fun addOnGesturePerformedListener(listener: GestureOverlayView.OnGesturePerformedListener!): Unit

addOnGesturingListener

Added in API level 4
open fun addOnGesturingListener(listener: GestureOverlayView.OnGesturingListener!): Unit

cancelClearAnimation

Added in API level 4
open fun cancelClearAnimation(): Unit

cancelGesture

Added in API level 4
open fun cancelGesture(): Unit

clear

Added in API level 4
open fun clear(animated: Boolean): Unit

dispatchTouchEvent

Added in API level 4
open fun dispatchTouchEvent(event: MotionEvent!): Boolean
Parameters
event MotionEvent!: The motion event to be dispatched.
Return
Boolean True if the event was handled by the view, false otherwise.

draw

Added in API level 4
open fun draw(canvas: Canvas): Unit
Parameters
canvas Canvas: The Canvas to which the View is rendered. This value cannot be null.

getCurrentStroke

Added in API level 4
open fun getCurrentStroke(): ArrayList<GesturePoint!>!

getFadeOffset

Added in API level 4
open fun getFadeOffset(): Long

getGesture

Added in API level 4
open fun getGesture(): Gesture!

getGestureColor

Added in API level 4
open fun getGestureColor(): Int

getGesturePath

Added in API level 4
open fun getGesturePath(): Path!

getGesturePath

Added in API level 4
open fun getGesturePath(path: Path!): Path!

getGestureStrokeAngleThreshold

Added in API level 4
open fun getGestureStrokeAngleThreshold(): Float

getGestureStrokeLengthThreshold

Added in API level 4
open fun getGestureStrokeLengthThreshold(): Float

getGestureStrokeSquarenessTreshold

Added in API level 4
open fun getGestureStrokeSquarenessTreshold(): Float

getGestureStrokeType

Added in API level 4
open fun getGestureStrokeType(): Int

getGestureStrokeWidth

Added in API level 4
open fun getGestureStrokeWidth(): Float

getOrientation

Added in API level 4
open fun getOrientation(): Int

getUncertainGestureColor

Added in API level 4
open fun getUncertainGestureColor(): Int

isEventsInterceptionEnabled

Added in API level 4
open fun isEventsInterceptionEnabled(): Boolean

isFadeEnabled

Added in API level 4
open fun isFadeEnabled(): Boolean

isGestureVisible

Added in API level 4
open fun isGestureVisible(): Boolean

isGesturing

Added in API level 4
open fun isGesturing(): Boolean

removeAllOnGestureListeners

Added in API level 4
open fun removeAllOnGestureListeners(): Unit

removeAllOnGesturePerformedListeners

Added in API level 4
open fun removeAllOnGesturePerformedListeners(): Unit

removeAllOnGesturingListeners

Added in API level 4
open fun removeAllOnGesturingListeners(): Unit

removeOnGestureListener

Added in API level 4
open fun removeOnGestureListener(listener: GestureOverlayView.OnGestureListener!): Unit

removeOnGesturePerformedListener

Added in API level 4
open fun removeOnGesturePerformedListener(listener: GestureOverlayView.OnGesturePerformedListener!): Unit

removeOnGesturingListener

Added in API level 4
open fun removeOnGesturingListener(listener: GestureOverlayView.OnGesturingListener!): Unit

setEventsInterceptionEnabled

Added in API level 4
open fun setEventsInterceptionEnabled(enabled: Boolean): Unit

setFadeEnabled

Added in API level 4
open fun setFadeEnabled(fadeEnabled: Boolean): Unit

setFadeOffset

Added in API level 4
open fun setFadeOffset(fadeOffset: Long): Unit

setGesture

Added in API level 4
open fun setGesture(gesture: Gesture!): Unit

setGestureColor

Added in API level 4
open fun setGestureColor(color: Int): Unit

setGestureStrokeAngleThreshold

Added in API level 4
open fun setGestureStrokeAngleThreshold(gestureStrokeAngleThreshold: Float): Unit

setGestureStrokeLengthThreshold

Added in API level 4
open fun setGestureStrokeLengthThreshold(gestureStrokeLengthThreshold: Float): Unit

setGestureStrokeSquarenessTreshold

Added in API level 4
open fun setGestureStrokeSquarenessTreshold(gestureStrokeSquarenessTreshold: Float): Unit

setGestureStrokeType

Added in API level 4
open fun setGestureStrokeType(gestureStrokeType: Int): Unit

setGestureStrokeWidth

Added in API level 4
open fun setGestureStrokeWidth(gestureStrokeWidth: Float): Unit

setGestureVisible

Added in API level 4
open fun setGestureVisible(visible: Boolean): Unit

setOrientation

Added in API level 4
open fun setOrientation(orientation: Int): Unit

setUncertainGestureColor

Added in API level 4
open fun setUncertainGestureColor(color: Int): Unit

Protected methods

onDetachedFromWindow

Added in API level 4
protected open fun onDetachedFromWindow(): Unit