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
Modifier and TypeFieldDescriptionint
int
AGravity
value describing how this child view dodges any inset child views in the CoordinatorLayout.int
AGravity
value describing how this child view should lay out.int
AGravity
value describing how this child view insets the CoordinatorLayout.Fields inherited from class icyllis.modernui.view.ViewGroup.MarginLayoutParams
bottomMargin, DEFAULT_MARGIN_RELATIVE, leftMargin, rightMargin, topMargin
Fields inherited from class icyllis.modernui.view.ViewGroup.LayoutParams
height, MATCH_PARENT, width, WRAP_CONTENT
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Get 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.void
setAnchorId
(int id) Set the id of this view's anchor.void
setBehavior
(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 gravityAGravity
value describing how this child view should lay out. If either or both of the axes are not specified, they are treated by CoordinatorLayout asGravity.TOP
orGravity.START
. If ananchor
is also specified, the gravity describes how this child view should be positioned relative to its anchored position. -
anchorGravity
public int anchorGravity -
insetEdge
public int insetEdgeAGravity
value 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 dodgeInsetEdgesAGravity
value 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 id
orView.NO_ID
if 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 id
of the anchor orView.NO_ID
if 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
-