BottomSheetDialog

Screenshot

Bottomsheetdialog - Reference - Enaml-native - CodeLV

Example

from enamlnative.widgets.api import *
from enamlnative.android.app import AndroidApplication
from enamlnative.core.api import Looper

enamldef ContentView(Flexbox):
    attr app = AndroidApplication.instance()
    flex_direction = "column"
    align_items = "stretch"
    Button:
        text = "Open bottom sheet"
        clicked :: sheet.show = True
    TextView:
        text << f"Show: {sheet.show}"
    BottomSheetDialog: sheet:
        Flexbox:
            flex_direction = "column"
            align_items = "stretch"
            Looper:
                iterable = range(3)
                Button:
                    flat = True
                    text = f"Action {loop.item}"
                    clicked ::
                        app.show_toast(self.text, False)
                        sheet.show = False

Declaration

class enamlnative.widgets.bottom_sheet_dialog.BottomSheetDialog(parent=None, **kwargs)[source]

Bases: enamlnative.widgets.dialog.Dialog

A dialog that slides up from the bottom of the screen.

proxy

A reference to the proxy object.

Android Implementation

class enamlnative.android.android_bottom_sheet_dialog.AndroidBottomSheetDialog[source]

Bases: enamlnative.android.android_dialog.AndroidDialog, enamlnative.widgets.bottom_sheet_dialog.ProxyBottomSheetDialog

An Android implementation of an Enaml ProxyBottomSheetDialog.

dialog

A reference to the widget created by the proxy.

create_widget()[source]

Create the underlying widget.

A dialog is not a subclass of view, hence we don’t set name as widget or children will try to use it as their parent.

No iOS implementation found.