Interface

TranslationScope

An interface that introduces the translation properties to a Style receiver scope.

Source set: Common
@Deprecated(
    DeprecatedStyleScope,
    replaceWith = ReplaceWith(""),
    level = DeprecationLevel.WARNING,
)
public interface TranslationScope

An interface that introduces the translation properties to a Style receiver scope.

Functions

translationX

Source set: Common
public fun translationX(@FloatRange(from = 0.0) value: Float)

Translates (moves) the component horizontally. Positive values move it to the right, negative values to the left.

This property is not inherited

Parameters

value The translation amount on the X-axis in pixels.

translationY

Source set: Common
public fun translationY(@FloatRange(from = 0.0) value: Float)

Translates (moves) the component vertically. Positive values move it down, negative values up.

This property is not inherited

Parameters

value The translation amount on the Y-axis 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: