Skip to main content

AbsoluteLayout

declare class AbsoluteLayout extends ViewGroup {}

A layout that lets you specify exact locations (x/y coordinates) of its children. Absolute layouts are less flexible and harder to maintain than other types of layouts without absolute positioning.




AbsoluteLayout.LayoutParams

Per-child layout information associated with AbsoluteLayout.

declare class LayoutParams extends ViewGroup.LayoutParams {}

Attribute

layout_x

<AbsoluteLayout>
<View layout_x="10px" />
</AbsoluteLayout>
  • Description

    The horizontal, or X, location of the child within the view group.

layout_y

<AbsoluteLayout>
<View layout_y="10px" />
</AbsoluteLayout>
  • Description

    The vertical, or Y, location of the child within the view group.