android-ui bottomsheet Android Java
Need help with BottomSheetCoordinatorLayout?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.
natario1

Description

A handy CoordinatorLayout that works well when used in a bottom sheet, even with AppBarLayouts inside.

221 Stars 40 Forks Apache License 2.0 29 Commits 4 Opened issues

Services available

Need anything else?

BottomSheetCoordinatorLayout

implementation 'com.otaliastudios:bottomsheetcoordinatorlayout:1.0.4'

A handy

CoordinatorLayout
that works well when used in a bottom sheet, even with
AppBarLayout
s inside.

Having issues with android.support v28? Please try

com.otaliastudios:bottomsheetcoordinatorlayout:1.1.0-RC1
.

Usage

Just use

BottomSheetCoordinatorLayout
as the root view of your bottom sheet. It will be automatically given the right
BottomSheetBehavior
.
<!-- AppBarLayout -->

<!-- Everything else -->

</com.otaliastudios.bottomsheetcoordinatorlayout.bottomsheetcoordinatorlayout>

To get an instance of the behavior, use

bscl.getBehavior()
. As usual with behaviors, the returned value might be null if the view has not gone through a layout, so wait for that.

If you just want to set appropriate

BottomSheetCallback
, you can use
bscl.setBottomSheetCallback()
. Callbacks will be added to the sheet behavior as soon as it is available, so this can be called safely whenever you want. Same goes for other set() methods: they will apply the result to the behavior as soon as it is available.

Contributing

You are welcome to contribute with issues, PRs or suggestions. To contact me, send an email.

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.