Class

FollowTarget

A FollowTarget can be used to have an element follow a target such as an anchor or view.

Source set: Android
public abstract class FollowTarget internal constructor(internal val mode: FollowMode)

A FollowTarget can be used to have an element follow a target such as an anchor or view.

Members

Companion

Source set: Android
public companion object

Functions

view

Source set: Android
public fun view(mode: FollowMode = FollowMode.soft()): FollowTarget

By designating content to follow the user's view, it will keep that content near the user and typically within the field of view, even as the user moves around.

Parameters

mode determines how the trailing element follows the target. It can be made to move faster and be more responsive. The default is FollowMode.soft().

anchor

Source set: Android
public fun anchor(anchor: Anchor, mode: FollowMode = FollowMode.tight()): FollowTarget

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

Parameters

anchor represents the anchor which the trailing element will be tethered to. As the anchor moves, so will the element.
mode determines how the trailing element follows the target. It can be made to move faster and be more responsive. The default is FollowMode.tight().

Content updated: