Positioning


Kotlin |Java

public class Positioning 


A representation of the positioning of a view relative to another.

Summary

Public fields

final int

The alignment between the dependency and the child.

final float

The x adjustment of the child relative to the dependency.

final float

The y adjustment of the child relative to the dependency.

Public constructors

Positioning(int gravity, float xAdjustment, float yAdjustment)

Public fields

gravity

public final int gravity 

The alignment between the dependency and the child.

xAdjustment

public final float xAdjustment 

The x adjustment of the child relative to the dependency. Positive values will adjust the child to the right.

yAdjustment

public final float yAdjustment 

The y adjustment of the child relative to the dependency. Positive values will adjust the child to the bottom.

Public constructors

Positioning

public Positioning(int gravity, float xAdjustment, float yAdjustment)

Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.

Last updated 2026年05月14日 UTC.