ForegroundGestureSubscriptionParams

public final class ForegroundGestureSubscriptionParams
extends Object

java.lang.Object
   ↳ com.google.wear.input.ForegroundGestureSubscriptionParams


Encapsulates parameters for subscribing to GestureEvents while the client is in the foreground (visible to the user).

Summary

Nested classes

class ForegroundGestureSubscriptionParams.Builder

Builder for ForegroundGestureSubscriptionParams

Public methods

boolean equals(Object o)

int[] getActions()

The actions that are subscribed to.

View getView()

The View on which received GestureEvents will be processed.

Window getWindow()

The Window on which received GestureEvents will be processed.

int hashCode()

boolean isAmbientSupported()

Whether GestureEvents will be detected and dispatched in ambient mode.

Inherited methods

Public methods

equals

Added in API level 37
public boolean equals (Object o)

Parameters
o Object

Returns
boolean

getActions

Added in API level 37
public int[] getActions ()

The actions that are subscribed to.

Returns
int[] Value is one of the following:

getView

Added in API level 37
public View getView ()

The View on which received GestureEvents will be processed.

If a View is provided in the subscription, gesture events are delivered to the subscription as long as the window to which this View is attached has focus (at the time of registration, or, if it gains focus after registration).

A given params object will either have a View or a Window, not both. Thus, if this is null, then getWindow() will NOT be null. If this is not {code null}, then getView() will be null.

Returns
View

getWindow

Added in API level 37
public Window getWindow ()

The Window on which received GestureEvents will be processed.

If a Window is provided in the subscription, gesture events are delivered to the subscription long as this window has focus (at the time of registration, or, if it gains focus after registration).

A given params object will either have a View or a Window, not both. Thus, if this is null, then getView() will NOT be null. If this is not {code null}, then getWindow() will be null.

Returns
Window

hashCode

Added in API level 37
public int hashCode ()

Returns
int

isAmbientSupported

Added in API level 37
public boolean isAmbientSupported ()

Whether GestureEvents will be detected and dispatched in ambient mode.

If ambient mode is not supported, this subscription will be only for when the display's state is Display.STATE_ON.

Returns
boolean