Interface

FollowTarget

A FollowTarget can be used with androidx.xr.compose.spatial.FollowingSubspace to have a set of content follow a target such as an anchor or AR device.

Source set: Android
@Deprecated(
    message =
        "FollowingSubspace has been deprecated. Migrate to Subspace using " +
            "androidx.xr.compose.subspace.animation.follow.FollowTarget instead."
)
public sealed interface FollowTarget

A FollowTarget can be used with androidx.xr.compose.spatial.FollowingSubspace to have a set of content follow a target such as an anchor or AR device.

Members

Companion

Source set: Android
public companion object

Functions

ArDevice

Source set: Android
@Deprecated(
            message =
                "FollowingSubspace has been deprecated. Migrate to Subspace using " +
                    "androidx.xr.compose.subspace.animation.follow.FollowTarget.view instead."
        )
        public fun ArDevice(session: Session): FollowTarget

By designating content to follow the AR device, it will keep that content near the device camera and typically within the field of view, even as the device moves around.

The Session is required to access the device's tracking state and to perform pose transformations between coordinate spaces.

Parameters

session The current Session instance used to track the device and transform poses.

Anchor

Source set: Android
@Deprecated(
            message =
                "FollowingSubspace has been deprecated. Migrate to Subspace using " +
                    "androidx.xr.compose.subspace.animation.follow.FollowTarget.anchor instead."
        )
        public fun Anchor(anchorSpace: AnchorSpace): FollowTarget

Targeting an anchor allows content to be positioned relative to that anchor's location.

Parameters

anchorSpace represents the anchor which this androidx.xr.compose.spatial.FollowingSubspace will be tethered to. As the anchor moves, so will the androidx.xr.compose.spatial.FollowingSubspace
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: