CoordinatorLayout.LayoutParams

public static class CoordinatorLayout.LayoutParams
extends ViewGroup.MarginLayoutParams

java.lang.Object
   ↳ android.view.ViewGroup.LayoutParams
     ↳ android.view.ViewGroup.MarginLayoutParams
       ↳ androidx.coordinatorlayout.widget.CoordinatorLayout.LayoutParams


Parameters describing the desired layout for a child of a CoordinatorLayout.

Summary

Inherited constants

Fields

public int anchorGravity

A Gravity value describing which edge of a child view's anchor view the child should position itself relative to.

public int dodgeInsetEdges

A Gravity value describing how this child view dodges any inset child views in the CoordinatorLayout.

public int gravity

A Gravity value describing how this child view should lay out.

public int insetEdge

A Gravity value describing how this child view insets the CoordinatorLayout.

public int keyline

The index of the horizontal keyline specified to the parent CoordinatorLayout that this child should align relative to.

Inherited fields

Public constructors

LayoutParams(int width, int height)
LayoutParams(CoordinatorLayout.LayoutParams p)
LayoutParams(ViewGroup.MarginLayoutParams p)
LayoutParams(ViewGroup.LayoutParams p)

Public methods

int getAnchorId()

Get the id of this view's anchor.

Behavior getBehavior()

Get the behavior governing the layout and interaction of the child view within a parent CoordinatorLayout.

void setAnchorId(int id)

Set the id of this view's anchor.

void setBehavior(Behavior behavior)

Set the behavior governing the layout and interaction of the child view within a parent CoordinatorLayout.

Inherited methods

Fields

anchorGravity

public int anchorGravity

A