v1.0.0-beta
Pre-releaseThis major release v1.0.0-beta supports anchor state 🎉, which means that you can have a middle state between collapsed and expanded.
This version now uses a custom BottomSheetBehavior implementation from miguelhincapie/CustomBottomSheetBehavior which is basically a fork from the original design-support, but with anchor state support and colors management, even though is custom implementation, old version should work as before, and you can also disable the anchor state with anchorEnabled prop which is disabled by default.
New Components
- MergedAppBarLayout
- ScrollingAppBarLayout
- BackdropBottomSheet
- BottomSheetHeader
BottomSheetBehavior
- Added
anchorEnabled
prop - Added
anchorPoint
prop
AppBarLayouts
We provide some custom AppBars that has custom behaviors, they automatically connects with BottomSheetBehavior in order to connects with ToolbarAndroid and toggle visibility, both AppBars can also manager StatusBar backgrounds.
Currently, AppBars only supports ToolbarAndroid as a child, you may have some troubles trying to render a custom View.
ScrollingAppBarLayout
This behavior hides and sets the StatusBar background to transparent when you starting dragging the BottomSheet, and reappears when the BottomSheet backs to the collapsed state, setting back the StatusBar background color with statusBarColor prop.
MergedAppBarLayout
The MergedAppBarLayout behavior appears when the BottomSheet reaches the anchor state (or expanded state if you're not using anchorEnabled). When the BottomSheet is getting over the MergedAppBar, it will partially sets the height of ToolbarAndroid revealing the mergedColor prop, and when the BottomSheet is fully expanded, it sets the ToolbarAndroid with the toolbarColor prop.
FloatingActionButton
- FloatingActionButton's has a custom behavior that hides when closely reaches MergedAppBarLayout.
BackdropBottomSheet
This component is rendered behind the BottomSheetBehavior, and behave like a parallax when BottomSheet is dragging. you should pass a fixed height prop that may match with anchorPoint prop from BottomSheet, in order to achieve a full screen view when reaches the anchor state.
BottomSheetHeader
This component abstracts color management between BottomSheet states on the native side, it will find all and components recursively and handles everything out the box.