-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Closed
Description
Building off of #78, we need guides for coordinating using the new CoordinatorLayout
:
- Scrolling up or down the floating action button slides up and down (See guide)
- CoordinatorLayout - a layout which provides an additional level of control over touch events between child views
- A great use of this is when you add a
FloatingActionButton
as a child of yourCoordinatorLayout
and then pass thatCoordinatorLayout
to yourSnackbar.make()
call - instead of the snackbar displaying over the floating action button, the FloatingActionButton takes advantage of additional callbacks provided byCoordinatorLayout
to automatically move upward as the snackbar animates in and returns to its position when the snackbar animates out CoordinatorLayout
also provides anlayout_anchor
attribute which, along withlayout_anchorGravity
, can be used to place floating views, such as the FloatingActionButton, relative to other views.
- A great use of this is when you add a
- AppBarLayout - allows your Toolbar and other views (such as tabs provided by TabLayout) to react to scroll events in a sibling view marked with a ScrollingViewBehavior
app:layout_behavior
andapp:layout_scrollFlags
- CollapsingToolbarLayout
- Affords detailed control on how different elements react to collapsing
CollapsingToolbarLayout’s app:layout_collapseMode="pin"
app:layout_collapseMode="parallax"
andapp:layout_collapseParallaxMultiplier="0.7"
app:contentScrim="?attr/colorPrimary"
- Setup ToolBar to show and hide as you scroll.
- Header of the list docks to top of the screen
References:
Metadata
Metadata
Assignees
Labels
No labels