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 |
Public methods | |
|---|---|
boolean
|
equals(Object o)
|
int[]
|
getActions()
The actions that are subscribed to. |
View
|
getView()
The |
Window
|
getWindow()
The |
int
|
hashCode()
|
boolean
|
isAmbientSupported()
Whether |
Inherited methods | |
|---|---|
Public methods
getActions
public int[] getActions ()
The actions that are subscribed to.
| Returns | |
|---|---|
int[] |
Value is one of the following: |
getView
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
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 |
|
isAmbientSupported
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 |
|
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 2026-06-11 UTC.