我们从Python开源项目中,提取了以下8个代码示例,用于说明如何使用kivy.uix.screenmanager.NoTransition()。
def build(self): Window.bind(keyboard_height=self.updateHeight) if platform == 'android': return MainWidget() # the dreaded splash screen code from kivy.uix.screenmanager import NoTransition, ScreenManager, Screen from kivy.uix.image import Image sm = ScreenManager(transition=NoTransition()) splashScr = Screen(name='SplashScreen') splashScr.add_widget(Image(source='misc/splash-desktop.png')) sm.add_widget(splashScr) mainScr = Screen(name='MainScreen') mainScr.add_widget(MainWidget()) sm.add_widget(mainScr) def switchToMainScr(instance): sm.current = 'MainScreen' Clock.schedule_once(switchToMainScr, 3) return sm
def build(self): # Instantiate Screen Manager and add a child widget-- the Main Screen # Root widget is RoboScreenManager sm = RoboScreenManager(transition=NoTransition()) sm.add_widget(MainScreen(name='main')) return sm
def build(self): sm = RoboScreenManager(transition=NoTransition()) sm.add_widget(MainScreen(name='main')) sm.add_widget(BackButtonScreen(name='back')) sm.add_widget(NoHeaderScreen(name='noheader')) return sm
def build(self): sm = RoboScreenManager(transition=NoTransition()) sm.add_widget(MainScreen(name='main')) return sm