JxrPlatformAdapter.MovableComponent


public interface JxrPlatformAdapter.MovableComponent extends JxrPlatformAdapter.Component


Component to enable a high level user movement affordance.

Summary

Public methods

abstract void
addMoveEventListener(
    @NonNull Executor executor,
    @NonNull JxrPlatformAdapter.MoveEventListener moveEventListener
)

Adds the listener to the set of active listeners for the move events.

abstract int

Returns the current scale with distance mode.

abstract void

Removes the listener from the set of active listeners for the move events.

abstract void
setScaleWithDistanceMode(int scaleWithDistanceMode)

Sets the scale with distance mode.

abstract void

Sets the size of the interaction highlight extent.

Inherited methods

From androidx.xr.scenecore.JxrPlatformAdapter.Component
abstract boolean

Lifecycle event, called when component is attached to an Entity.

abstract void

Lifecycle event, called when component is detached from an Entity.

Public methods

addMoveEventListener

Added in 1.0.0-alpha01
abstract void addMoveEventListener(
    @NonNull Executor executor,
    @NonNull JxrPlatformAdapter.MoveEventListener moveEventListener
)

Adds the listener to the set of active listeners for the move events.

The listener is invoked on the provided executor. If the app intends to modify the UI elements/views during the callback, the app should provide the thread executor that is appropriate for the UI operations. For example, if the app is using the main thread to render the UI, the app should provide the main thread (Looper.getMainLooper()) executor. If the app is using a separate thread to render the UI, the app should provide the executor for that thread.

Parameters
@NonNull Executor executor

The executor to run the listener on.

@NonNull JxrPlatformAdapter.MoveEventListener moveEventListener

The move event listener to set.

getScaleWithDistanceMode

Added in 1.0.0-alpha01
abstract int getScaleWithDistanceMode()

Returns the current scale with distance mode.

removeMoveEventListener

Added in 1.0.0-alpha01
abstract void removeMoveEventListener(
    @NonNull JxrPlatformAdapter.MoveEventListener moveEventListener
)

Removes the listener from the set of active listeners for the move events.

Parameters
@NonNull JxrPlatformAdapter.MoveEventListener moveEventListener

the move event listener to remove

setScaleWithDistanceMode

Added in 1.0.0-alpha01
abstract void setScaleWithDistanceMode(int scaleWithDistanceMode)

Sets the scale with distance mode.

Parameters
int scaleWithDistanceMode

The scale with distance mode to set

setSize

Added in 1.0.0-alpha01
abstract void setSize(@NonNull JxrPlatformAdapter.Dimensions dimensions)

Sets the size of the interaction highlight extent.