Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created October 31, 2015 23:03
Show Gist options
  • Save tshirtman/d455671401ff4c694306 to your computer and use it in GitHub Desktop.
Save tshirtman/d455671401ff4c694306 to your computer and use it in GitHub Desktop.
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.button import Button
from kivy.uix.screenmanager import ScreenManager, Screen
from kivy.lang import Builder
class First_screen(Screen):
pass
class Second_screen(Screen):
pass
class My_manager(ScreenManager):
pass
Builder.load_file("testing_screens.kv")
class Testing_screens(App):
def build(self):
return My_manager()
Testing_screens().run()
<My_manager>:
First_screen:
Second_screen:
<First_screen>:
name: "one"
Button:
text: "hello peeps"
on_press: app.root.current= "two"
<Second_screen>:
name: "two"
Button:
text: "world gurus"
on_press: app.root.current= "one"
@rtaboadam
Copy link

Thank you, man

@faurepa
Copy link

faurepa commented Apr 11, 2017

Thank you, I wish that I had found your example hours ago.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment