belongs to Maven artifact com.android.support:coordinatorlayout:28.0.0-alpha1
CoordinatorLayout
public
class
CoordinatorLayout
extends ViewGroup
implements
NestedScrollingParent2
java.lang.Object | |||
↳ | android.view.View | ||
↳ | android.view.ViewGroup | ||
↳ | android.support.design.widget.CoordinatorLayout |
CoordinatorLayout is a super-powered FrameLayout
.
CoordinatorLayout is intended for two primary use cases:
- As a top-level application decor or chrome layout
- As a container for a specific interaction with one or more child views
By specifying Behaviors
for child views of a
CoordinatorLayout you can provide many different interactions within a single parent and those
views can also interact with one another. View classes can specify a default behavior when
used as a child of a CoordinatorLayout using the
CoordinatorLayout.DefaultBehavior
annotation.
Behaviors may be used to implement a variety of interactions and additional layout modifications ranging from sliding drawers and panels to swipe-dismissable elements and buttons that stick to other elements as they move and animate.
Children of a CoordinatorLayout may have an
anchor
. This view id must correspond
to an arbitrary descendant of the CoordinatorLayout, but it may not be the anchored child itself
or a descendant of the anchored child. This can be used to place floating views relative to
other arbitrary content panes.
Children can specify insetEdge
to describe how the
view insets the CoordinatorLayout. Any child views which are set to dodge the same inset edges by
dodgeInsetEdges
will be moved appropriately so that the
views do not overlap.
Summary
Nested classes | |
---|---|
interface |
CoordinatorLayout.AttachedBehavior
Defines the default attached When writing a custom view, implement this interface to return the default behavior
when used as a direct child of an |
class |
CoordinatorLayout.Behavior<V extends View>
Interaction behavior plugin for child views of |
@interface |
CoordinatorLayout.DefaultBehavior
This @interface was deprecated
in API level 27.1.0.
Use |
class |
CoordinatorLayout.LayoutParams
Parameters describing the desired layout for a child of a |
class |
CoordinatorLayout.SavedState
|
Inherited constants |
---|
![]()
android.view.ViewGroup
|
![]()
android.view.View
|
Inherited fields |
---|
![]()
android.view.View
|