Skip to content

Example project that shows a few different ways to utilize a bottom sheet on Android.

License

Notifications You must be signed in to change notification settings

MCeley/BottomSheetExample

Repository files navigation

Bottom Sheet Example

This is a pretty quick and dirty example project that shows three different ways in which a developer might create a bottom sheet in Android.

The three situations covered are:

  • In-layout with BottomSheetBehavior
  • Modal with BottomSheetDialogFragment
  • Modal with BottomSheetDialogFragment wrapped in a separate Activity

While the first two cases are likely the most common, the third case can occur if the developer wants to show a bottom sheet for phones and a centered modal for tablets. The Activity would be used to wrap the logic that shows either the bottom sheet or centered modal to simplify using the modal in practice.

  • Clicking a season in the list will present an in-layout bottom sheet.
  • Clicking sort from the action bar will present a standalone BottomSheetDialogFragment.
  • Clicking stats from the action bar will present an Activity that will shows a BottomSheetDialogFragment on phones and a DialogFragment on tablets.

About

Example project that shows a few different ways to utilize a bottom sheet on Android.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages