Package icyllis.modernui.widget
Class CoordinatorLayout.LayoutParams
java.lang.Object
icyllis.modernui.view.ViewGroup.LayoutParams
icyllis.modernui.view.ViewGroup.MarginLayoutParams
icyllis.modernui.widget.CoordinatorLayout.LayoutParams
- Enclosing class:
CoordinatorLayout
Parameters describing the desired layout for a child of a
CoordinatorLayout.-
Field Summary
FieldsModifier and TypeFieldDescriptionintintAGravityvalue describing how this child view dodges any inset child views in the CoordinatorLayout.intAGravityvalue describing how this child view should lay out.intAGravityvalue describing how this child view insets the CoordinatorLayout.Fields inherited from class icyllis.modernui.view.ViewGroup.MarginLayoutParams
bottomMargin, DEFAULT_MARGIN_RELATIVE, leftMargin, rightMargin, topMarginFields inherited from class icyllis.modernui.view.ViewGroup.LayoutParams
height, MATCH_PARENT, width, WRAP_CONTENT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGet the id of this view's anchor.<V extends View>
CoordinatorLayout.Behavior<V> Get the behavior governing the layout and interaction of the child view within a parent CoordinatorLayout.voidsetAnchorId(int id) Set the id of this view's anchor.voidsetBehavior(CoordinatorLayout.Behavior<?> behavior) Set the behavior governing the layout and interaction of the child view within a parent CoordinatorLayout.Methods inherited from class icyllis.modernui.view.ViewGroup.MarginLayoutParams
copyMarginsFrom, getLayoutDirection, getMarginEnd, getMarginStart, isLayoutRtl, isMarginRelative, onDebugDraw, resolveLayoutDirection, setLayoutDirection, setMarginEnd, setMargins, setMarginsRelative, setMarginStart
-
Field Details
-
gravity
public int gravityAGravityvalue describing how this child view should lay out. If either or both of the axes are not specified, they are treated by CoordinatorLayout asGravity.TOPorGravity.START. If ananchoris also specified, the gravity describes how this child view should be positioned relative to its anchored position. -
anchorGravity
public int anchorGravity -
insetEdge
public int insetEdgeAGravityvalue describing how this child view insets the CoordinatorLayout. Other child views which are set to dodge the same inset edges will be moved appropriately so that the views do not overlap. -
dodgeInsetEdges
public int dodgeInsetEdgesAGravityvalue describing how this child view dodges any inset child views in the CoordinatorLayout. Any views which are inset on the same edge as this view is set to dodge will result in this view being moved so that the views do not overlap.
-
-
Constructor Details
-
LayoutParams
public LayoutParams(int width, int height) -
LayoutParams
-
LayoutParams
-
-
Method Details
-
getAnchorId
public int getAnchorId()Get the id of this view's anchor.- Returns:
- A
view idorView.NO_IDif there is no anchor
-
setAnchorId
public void setAnchorId(int id) Set the id of this view's anchor.The view with this id must be a descendant of the CoordinatorLayout containing the child view this LayoutParams belongs to. It may not be the child view with this LayoutParams or a descendant of it.
- Parameters:
id- Theview idof the anchor orView.NO_IDif there is no anchor
-
getBehavior
Get the behavior governing the layout and interaction of the child view within a parent CoordinatorLayout.- Returns:
- The current behavior or null if no behavior is specified
-
setBehavior
Set the behavior governing the layout and interaction of the child view within a parent CoordinatorLayout.Setting a new behavior will remove any currently associated
Behavior tag.- Parameters:
behavior- The behavior to set or null for no special behavior
-