Skip to content

Instantly share code, notes, and snippets.

@kived
Last active August 29, 2015 14:14
Show Gist options
  • Save kived/2315c55d9e940d78ace6 to your computer and use it in GitHub Desktop.
Save kived/2315c55d9e940d78ace6 to your computer and use it in GitHub Desktop.
Kivy: ScreenManager with custom transition clear color
from kivy.app import App
from kivy.lang import Builder
root = Builder.load_string('''
#:import WipeTransition kivy.uix.screenmanager.WipeTransition
ScreenManager:
transition: WipeTransition(clearcolor=(1, 1, 1, 1))
Screen:
name: 's1'
Button:
size_hint: 0.5, 0.5
on_press: root.current = 's2'
Screen:
name: 's2'
Button:
size_hint: 0.5, 0.5
on_press: root.current = 's1'
''')
class TestApp(App):
def build(self):
return root
if __name__ == '__main__':
TestApp().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment