ForegroundGestureSubscriptionParams.Builder
public
static
final
class
ForegroundGestureSubscriptionParams.Builder
extends Object
| java.lang.Object | |
| ↳ | com.google.wear.input.ForegroundGestureSubscriptionParams.Builder |
Builder for ForegroundGestureSubscriptionParams.
Summary
Public constructors | |
|---|---|
Builder(int[] actions, View view)
Constructs a new instance of |
|
Builder(int[] actions, Window window)
Constructs a new instance of |
|
Public methods | |
|---|---|
ForegroundGestureSubscriptionParams
|
build()
Builds a new |
ForegroundGestureSubscriptionParams.Builder
|
setAmbientSupported(boolean ambientSupported)
Sets whether |
Inherited methods | |
|---|---|
Public constructors
Builder
public Builder (int[] actions,
View view)Constructs a new instance of ForegroundGestureSubscriptionParams for a View-based
subscription.
| Parameters | |
|---|---|
actions |
int: an array of all the actions to subscribe to. This must be NOT empty, and
all actions in this array must be supported (see GestureInputManager.isActionSupported(int)).
Value is one of the following: |
view |
View: the View on which received GestureEvents will be processed.
Events are delivered only while the Window hosting this View has focus. |
Builder
public Builder (int[] actions,
Window window)Constructs a new instance of ForegroundGestureSubscriptionParams for a
Window-based subscription.
| Parameters | |
|---|---|
actions |
int: an array of all the actions to subscribe to. This must be NOT empty, and
all actions in this array must be supported (see GestureInputManager.isActionSupported(int)).
Value is one of the following: |
window |
Window: the Window on which received GestureEvents will be
processed. This window should have a View attached (Window.peekDecorView()
should not be null). Otherwise, an IllegalArgumentException will be
thrown. Events are delivered to the listener only while this window has
focus. |
Public methods
build
public ForegroundGestureSubscriptionParams build ()
Builds a new ForegroundGestureSubscriptionParams from this builder object.
| Returns | |
|---|---|
ForegroundGestureSubscriptionParams |
|
setAmbientSupported
public ForegroundGestureSubscriptionParams.Builder setAmbientSupported (boolean ambientSupported)
Sets whether GestureEvents should be detected and dispatched in ambient mode. If
false, this subscription will be only for when the display's state is Display.STATE_ON.
| Parameters | |
|---|---|
ambientSupported |
boolean |
| Returns | |
|---|---|
ForegroundGestureSubscriptionParams.Builder |
|