Interface IBottomSheet<TEvent>

Since

5.0.4

Android

BottomSheet represents a bottom sheet. A bottom sheet helps people perform a scoped task that’s closely related to their current context. This component only supported on Android.

Example

const content = new FlexLayout(); content.height = 300; content.width = 300; const bottomSheet = new BottomSheet({ view: content, borderRadius: 10, detents: detents, }); bottomSheet.on('dismissed', () => { console.log("on dismissed, isShowing: ", bottomSheet.isShowing); }) bottomSheet.show();

Type Parameters

Hierarchy

Methods

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    Returns (() => void)

      • (): void
      • Creates an event emitter instance to listen for the actions

        Returns

        Call the function to remove the event

        Returns void

  • Creates an event emitter instance to listen for the actions

    Returns

    Call the function to remove the event

    Parameters

    Returns (() => void)

      • (): void
      • Creates an event emitter instance to listen for the actions

        Returns

        Call the function to remove the event

        Returns void

  • Removes the specified event and invokes the callback after it is removed

    Parameters

    Returns void

  • Triggers the event manually.

    Parameters

    • event: "dismissed" | TEvent
    • Rest ...args: any[]

      Arguments that needs to be passed down

    Returns void

  • Adds the listener function to the beginning of the listeners array for the event named eventName. No checks are made to see if the listener has already been added. Multiple calls passing the same combination of eventName and listener will result in the listener being added, and called, multiple times.

    Parameters

    Returns void

  • Adds a one-time listener function for the event named eventName to the beginning of the listeners array. The next time eventName is triggered, this listener is removed, and then invoked.

    Parameters

    Returns void

  • Show the bottom sheet.

    Method

    show

    Android

    Since

    5.0.4

    Returns void

  • Dismiss the bottom sheet.

    Method

    dismiss

    Android

    Since

    5.0.4

    Returns void

Properties

nativeObject: any
ios: Partial<{ [key: string]: any }>
android: Partial<{ [key: string]: any }>
view: IView<"touch" | "touchCancelled" | "touchEnded" | "touchMoved", { [key: string]: any }, MobileOSProps<ViewIOSProps, ViewAndroidProps>>

Determines the view of the bottom sheet.

Property

Android

Since

5.0.4

borderRadius: number

Determines the borderRadius of the bottom sheet.

Property

= 0]

Android

Since

5.0.4

detents: ("large" | "medium")[]

Determines the heights where the bottom sheet can rest.

Property

= ['medium']]

Android

Since

5.0.4

isShowing: boolean

Gets status of the bottom sheet. Returns true if the bottom sheet is currently displayed on the screen.

Android

Property

Since

5.0.4

onDismissed: (() => void)

Type declaration

    • (): void
    • This function called when displayed bottom sheet dismissed.

      Android

      Since

      5.0.4

      Returns void

Generated using TypeDoc