JxrPlatformAdapter.MovableComponent


interface JxrPlatformAdapter.MovableComponent : JxrPlatformAdapter.Component


Component to enable a high level user movement affordance.

Summary

Public functions

Unit
addMoveEventListener(
    executor: Executor,
    moveEventListener: JxrPlatformAdapter.MoveEventListener
)

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

Int

Returns the current scale with distance mode.

Unit

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

Unit
setScaleWithDistanceMode(scaleWithDistanceMode: Int)

Sets the scale with distance mode.

Unit

Sets the size of the interaction highlight extent.

Inherited functions

Boolean

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

Unit

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

Public functions

addMoveEventListener

Added in 1.0.0-alpha01
fun addMoveEventListener(
    executor: Executor,
    moveEventListener: JxrPlatformAdapter.MoveEventListener
): Unit

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
executor: Executor

The executor to run the listener on.

moveEventListener: JxrPlatformAdapter.MoveEventListener

The move event listener to set.

getScaleWithDistanceMode

Added in 1.0.0-alpha01
fun getScaleWithDistanceMode(): Int

Returns the current scale with distance mode.

removeMoveEventListener

Added in 1.0.0-alpha01
fun removeMoveEventListener(
    moveEventListener: JxrPlatformAdapter.MoveEventListener
): Unit

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

Parameters
moveEventListener: JxrPlatformAdapter.MoveEventListener

the move event listener to remove

setScaleWithDistanceMode

Added in 1.0.0-alpha01
fun setScaleWithDistanceMode(scaleWithDistanceMode: Int): Unit

Sets the scale with distance mode.

Parameters
scaleWithDistanceMode: Int

The scale with distance mode to set

setSize

Added in 1.0.0-alpha01
fun setSize(dimensions: JxrPlatformAdapter.Dimensions): Unit

Sets the size of the interaction highlight extent.

A new Play Store for large screens - this new version helps users more easily find high-quality apps and games that are optimized for their tablets, foldables, and Chromebooks.

Updated Aug 7, 2023

The developer center about creating games for Android. Learn how to develop, optimize, and publish your Android game using the latest tools and SDKs.

Updated Oct 28, 2024

Discover the latest app development tools, platform updates, training, and documentation for developers across every Android device.

Updated Dec 18, 2024