Last active
August 29, 2015 14:14
-
-
Save kived/2315c55d9e940d78ace6 to your computer and use it in GitHub Desktop.
Kivy: ScreenManager with custom transition clear color
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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