How to use the kivymd.list.OneLineListItem function in kivymd

To help you get started, we’ve selected a few kivymd examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AndreMiras / KivyMD / kivymd / navigationdrawer.py View on Github external
def on_active_color_type(self, *args):
        self._set_active_color(args)


class NavigationDrawerSubheader(OneLineListItem):
    '''
    A subheader for separating content in :class:`MDNavigationDrawer`

    Works well alongside :class:`NavigationDrawerDivider`
    '''
    disabled = True
    divider = None
    theme_text_color = 'Secondary'


class NavigationDrawerDivider(OneLineListItem):
    '''
    A small full-width divider that can be placed in the :class:`MDNavigationDrawer`
    '''
    disabled = True
    divider = None
    _txt_top_pad = NumericProperty(dp(8))
    _txt_bot_pad = NumericProperty(dp(8))

    def __init__(self, **kwargs):
        super(OneLineListItem, self).__init__(**kwargs)
        self.height = dp(16)


class MDNavigationDrawer(BoxLayout, ThemableBehavior, RectangularElevationBehavior):
    '''
    '''
github AndreMiras / EtherollApp / src / etherollapp / etheroll / switchaccount.py View on Github external
def create_item(self, account):
        """
        Creates an account list item from given account.
        """
        address = "0x" + account.address.hex()
        list_item = OneLineListItem(text=address)
        # makes sure the address doesn't overlap on small screen
        list_item.ids._lbl_primary.shorten = True
        list_item.account = account
        list_item.bind(on_release=lambda x: self.on_release(x))
        return list_item
github mobile-insight / mobileinsight-mobile / app / kivymd / navigationdrawer.py View on Github external
def _set_active_color_primary(self, *args):
        if self.active_color_type == 'primary':
            self._active_color = self.theme_cls.primary_color

    def _set_active_color_accent(self, *args):
        if self.active_color_type == 'accent':
            self._active_color = self.theme_cls.accent_color

    def on_icon(self, instance, value):
        self.ids['_icon'].text = "{}".format(md_icons[value])

    def on_active_color_type(self, *args):
        self._set_active_color(args)


class NavigationDrawerSubheader(OneLineListItem):
    '''
    A subheader for separating content in :class:`MDNavigationDrawer`

    Works well alongside :class:`NavigationDrawerDivider`
    '''
    disabled = True
    divider = None
    theme_text_color = 'Secondary'


class NavigationDrawerDivider(OneLineListItem):
    '''
    A small full-width divider that can be placed in the :class:`MDNavigationDrawer`
    '''
    disabled = True
    divider = None
github AndreMiras / PyWallet / src / pywallet / switchaccount.py View on Github external
def create_item(self, account):
        """
        Creates an account list item from given account.
        """
        # circular ref
        from pywallet.controller import Controller
        address = "0x" + account.address.hex()
        # gets the alias if exists
        try:
            text = Controller.get_address_alias(address)
        except KeyError:
            text = address
        list_item = OneLineListItem(text=text)
        # makes sure the address doesn't overlap on small screen
        list_item.ids._lbl_primary.shorten = True
        list_item.account = account
        list_item.bind(on_release=lambda x: self.on_release(x))
        return list_item
github mobile-insight / mobileinsight-mobile / app / kivymd / navigationdrawer.py View on Github external
def on_active_color_type(self, *args):
        self._set_active_color(args)


class NavigationDrawerSubheader(OneLineListItem):
    '''
    A subheader for separating content in :class:`MDNavigationDrawer`

    Works well alongside :class:`NavigationDrawerDivider`
    '''
    disabled = True
    divider = None
    theme_text_color = 'Secondary'


class NavigationDrawerDivider(OneLineListItem):
    '''
    A small full-width divider that can be placed in the :class:`MDNavigationDrawer`
    '''
    disabled = True
    divider = None
    _txt_top_pad = NumericProperty(dp(8))
    _txt_bot_pad = NumericProperty(dp(8))

    def __init__(self, **kwargs):
        super(OneLineListItem, self).__init__(**kwargs)
        self.height = dp(16)


class MDNavigationDrawer(BoxLayout, ThemableBehavior, RectangularElevationBehavior):
    '''
    '''
github mobile-insight / mobileinsight-mobile / app / kivymd / navigationdrawer.py View on Github external
def __init__(self, **kwargs):
        super(OneLineListItem, self).__init__(**kwargs)
        self.height = dp(16)
github AndreMiras / KivyMD / kivymd / navigationdrawer.py View on Github external
def _set_active_color_primary(self, *args):
        if self.active_color_type == 'primary':
            self._active_color = self.theme_cls.primary_color

    def _set_active_color_accent(self, *args):
        if self.active_color_type == 'accent':
            self._active_color = self.theme_cls.accent_color

    def on_icon(self, instance, value):
        self.ids['_icon'].text = u"{}".format(md_icons[value])

    def on_active_color_type(self, *args):
        self._set_active_color(args)


class NavigationDrawerSubheader(OneLineListItem):
    '''
    A subheader for separating content in :class:`MDNavigationDrawer`

    Works well alongside :class:`NavigationDrawerDivider`
    '''
    disabled = True
    divider = None
    theme_text_color = 'Secondary'


class NavigationDrawerDivider(OneLineListItem):
    '''
    A small full-width divider that can be placed in the :class:`MDNavigationDrawer`
    '''
    disabled = True
    divider = None