Based on the docs why can't I use MDSmartTile?

Viewed 14

I'm using kivymd and in this code I get this error:

raise FactoryException('Unknown class <%s>' % name) kivy.factory.FactoryException: Unknown class

I used MDSmartTile: inside of the MDBottomNavigationItem:.

This is the code:

from kivy.lang import Builder

from kivymd.app import MDApp
 
 
KV = '''
Screen:
    MDBoxLayout:
        orientation:"vertical"
        MDToolbar:
            left_action_items:[["menu",lambda x:None,]]
            right_action_items:[["bell-ring-outline", lambda x: None,]]                                                
            md_bg_color: 255/255, 255/255,255/255, 1
            specific_text_color:  0, 0, 0, 1
 
        MDBottomNavigation:
            panel_color:1,1,1,1
            text_color_active:245/255,111/255,58/255,1
            text_color_normal: 0, 0, 0, 1
            
            MDBottomNavigationItem:
                name: "s1"
                icon:"wallet"
                
                MDSmartTile:
                    radius: 24
                    box_radius: [0, 0, 24, 24]
                    box_color: 1, 1, 1, .2
                    source: "1.png"
                    pos_hint: {"center_x": .5, "center_y": .5}
                    size_hint: None, None
                    size: "320dp", "320dp"



                    
            MDBottomNavigationItem:
                name: "s2"
                icon:"chat"
            MDBottomNavigationItem:
                name: "s3"
                icon:"youtube"          
            MDBottomNavigationItem:
                name: "s4"
                icon:"face"
 
 
 
 
'''


class Test(MDApp):
    def build(self):
        return Builder.load_string(KV)


Test().run()

Based on the docs why can't I use MDSmartTile?

0 Answers
Related