• Stars
    star
    268
  • Rank 153,144 (Top 4 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated about 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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

BottomSheetCoordinatorLayout

implementation 'com.otaliastudios:bottomsheetcoordinatorlayout:1.0.4'

A handy CoordinatorLayout that works well when used in a bottom sheet, even with AppBarLayouts 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.

<com.otaliastudios.bottomsheetcoordinatorlayout.BottomSheetCoordinatorLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent">
    
    <!-- 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.

More Repositories

1

CameraView

πŸ“Έ A well documented, high-level Android interface that makes capturing pictures and videos easy, addressing all of the common issues and needs. Real-time filters, gestures, watermarks, frame processing, RAW, output of any size.
Java
4,943
star
2

ZoomLayout

2D zoom and pan behavior for View hierarchies, images, video streams, and much more, written in Kotlin for Android.
Kotlin
1,051
star
3

Autocomplete

Simple yet powerful autocomplete behavior for EditTexts, to avoid working with MultiAutoCompleteTextView APIs.
Java
357
star
4

ViewPrinter

Live preview, edit and print functionality for View hierarchies. Supports PDF, PNG, JPEG.
Java
190
star
5

Egloo

A lightweight Kotlin multiplatform framework for OpenGL ES and EGL management based on object-oriented components, inspired by Google's Grafika.
Kotlin
146
star
6

GIFCompressor

An Android tool to compresses your GIFs into lightweight MP4 video using fast, hardware-accelerated encoders. Supports cropping, rotation, GIF concatenation and much more.
Java
123
star
7

Elements

βš’ Modular components for RecyclerView development enforcing clean, reusable and testable code, with built-in support for paging and complex hierarchies of data.
Kotlin
82
star
8

whatsapp-database-merger

Small command-line utility to safely merge multiple WhatsApp backups (msgstore.db) into one.
Kotlin
65
star
9

NestedScrollCoordinatorLayout

A CoordinatorLayout that implements nested scrolling and propagates scroll events to parent views.
Java
63
star
10

Firestore

The lightweight, efficient Android wrapper for Google's Firestore model data.
Kotlin
33
star
11

ConstrainedScrollBehavior

An AppBarLayout.ScrollingViewBehavior that adapts scrolling view height based on its content.
Java
18
star
12

Elements-Deprecated

A library of reusable components for RecyclerView, simplifying the development of complex adapters.
Java
11
star
13

Playground

Kotlin
1
star