Function

translation

Translates (moves) the component horizontally and vertically.

translation

Source set: Common
@Deprecated(
    DeprecatedStyleProperty,
    replaceWith = ReplaceWith(""),
    level = DeprecationLevel.WARNING,
)
public fun TranslationScope.translation(
    @FloatRange(from = 0.0) x: Float,
    @FloatRange(from = 0.0) y: Float,
)

Translates (moves) the component horizontally and vertically.

This property is not inherited

Parameters

x The translation amount on the X-axis in pixels.
y The translation amount on the Y-axis in pixels.

translation

Source set: Common
@Deprecated(
    DeprecatedStyleProperty,
    replaceWith = ReplaceWith(""),
    level = DeprecationLevel.WARNING,
)
public fun TranslationScope.translation(offset: Offset)

Translates (moves) the component by the given Offset.

This property is not inherited

Parameters

offset The translation offset in pixels.
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: