ModifiersBuilders.Transformation


@RequiresSchemaVersion(major = 1, minor = 400)
public final class ModifiersBuilders.Transformation


A modifier to apply transformations to the element. All of these transformations can be animated by setting dynamic values. This modifier is not layout affecting.

Summary

Nested types

Builder for Transformation

Public methods

@Nullable DimensionBuilders.PivotDimension

Sets the x offset of the point around which the element is rotated and scaled.

@Nullable DimensionBuilders.PivotDimension

Gets the y offset of the point around which the element is rotated and scaled.

@Nullable DimensionBuilders.DegreesProp

Gets the clockwise Degrees that the element is rotated around the pivot point.

@Nullable TypeBuilders.FloatProp

Gets the scale of this element in the x direction around the pivot point, as a proportion of the element's unscaled width .

@Nullable TypeBuilders.FloatProp

Gets the scale of this element in the y direction around the pivot point, as a proportion of the element's unscaled height.

@Nullable DimensionBuilders.DpProp

Gets the horizontal offset of this element relative to the location where the element's layout placed it.

@Nullable DimensionBuilders.DpProp

Gets the vertical offset of this element in addition to the location where the element's layout placed it.

@NonNull String

Public methods

getPivotX

Added in 1.2.0-alpha01
public @Nullable DimensionBuilders.PivotDimension getPivotX()

Sets the x offset of the point around which the element is rotated and scaled. Dynamic value is supported. By default, the pivot is centered on the element. Note that, for androidx.wear.protolayout.LayoutElementBuilders.ArcText or androidx.wear.protolayout.LayoutElementBuilders.ArcLine, the element inscribes the entire circle and the default pivot is located at the center of the circle.

getPivotY

Added in 1.2.0-alpha01
public @Nullable DimensionBuilders.PivotDimension getPivotY()

Gets the y offset of the point around which the element is rotated and scaled. Dynamic value is supported. By default, the pivot is centered on the element. Note that, for androidx.wear.protolayout.LayoutElementBuilders.ArcText or androidx.wear.protolayout.LayoutElementBuilders.ArcLine, the element inscribes the entire circle and the default pivot is located at the center of the circle.

getRotation

Added in 1.2.0-alpha01
public @Nullable DimensionBuilders.DegreesProp getRotation()

Gets the clockwise Degrees that the element is rotated around the pivot point.

getScaleX

Added in 1.2.0-alpha01
public @Nullable TypeBuilders.FloatProp getScaleX()

Gets the scale of this element in the x direction around the pivot point, as a proportion of the element's unscaled width .

getScaleY

Added in 1.2.0-alpha01
public @Nullable TypeBuilders.FloatProp getScaleY()

Gets the scale of this element in the y direction around the pivot point, as a proportion of the element's unscaled height.

getTranslationX

Added in 1.2.0-alpha01
public @Nullable DimensionBuilders.DpProp getTranslationX()

Gets the horizontal offset of this element relative to the location where the element's layout placed it.

getTranslationY

Added in 1.2.0-alpha01
public @Nullable DimensionBuilders.DpProp getTranslationY()

Gets the vertical offset of this element in addition to the location where the element's layout placed it.

toString

public @NonNull String toString()