You are here: BottomSheet Widget

BottomSheet Widget

A bottom sheet is a window that slides up from the bottom edge of the screen. It is used to reveal additional content and options to users. If required, users can show and dismiss the BottomSheet widget.

This widget is available for the Android platform only and can be created only through code. The following Gradle Entry needs to be made in order to access the BottomSheet widget. The supported API version is 26.

dependencies {
    implementation 'com.android.support:design:26.0.0'
}

Following are the key use cases of Bottom Sheet widget:

The BottomSheet widget capabilities can be broadly categorized into the following:

BottomSheet State

Properties Description
skipCollapsed If this property is set to true, a BottomSheet directly goes from an Expanded state to a Dismissed one.
 
MethodsDescription
setStateSets the state of a BottomSheet widget as Expanded or Collapsed.
 
EventsDescription
onCollapsedCalled when you need to collapse a BottomSheet from its peek height.
onExpandedCalled when a BottomSheet reaches its fully expanded state.
onDraggingStartedCalled when you need to start dragging a BottomSheet to an Expanded or Collapsed state.

 

Miscellaneous

PropertiesDescription
backgroundTransparency Indicates to users that the UI control is currently restricted for a BottomSheet until it is dismissed, i.e., dragged down completely.
contentWidget Sets the template of a BottomSheet.
peekHeight The height at which a collapsed BottomSheet docks.
 
MethodsDescription
destroyEnsures that the garbage collection process of a BottomSheet occurs, and the data of the BottomSheet is wiped out.
dismiss Dismisses a BottomSheet widget for users.
showDisplays a BottomSheet widget for users.
 
EventsDescription
onDismiss Called when you need to dismiss a BottomSheet from the screen.
onShow Called when you need a BottomSheet to be displayed on the screen.
onSettled Called when a BottomSheet is at peek height, is expanded, or is dismissed.
onSliding Called when a BottomSheet slides in/out of view.
premCopyright © 2012 Kony, Inc. All rights reserved.
premCopyright © 2012 Kony, Inc. All rights reserved.