Skip to content

Instantly share code, notes, and snippets.

@tshirtman
Created January 14, 2021 18:33
Show Gist options
  • Save tshirtman/e4eb75b6c8030ac982a87d89f28151a7 to your computer and use it in GitHub Desktop.
Save tshirtman/e4eb75b6c8030ac982a87d89f28151a7 to your computer and use it in GitHub Desktop.
'''
'''
from kivy.app import App
from kivy.lang import Builder
KV = '''
FloatLayout:
GridLayout:
cols: 3
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'x': 0, 'top': 1}
text: '1'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'center_x': .5, 'top': 1}
text: '2'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'right': 1, 'top': 1}
text: '3'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'x': 0, 'center_y': .5}
text: '4'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'center_x': .5, 'center_y': .5}
text: '5'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'right': 1, 'center_y': .5}
text: '6'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'x': 0, 'y': 0}
text: '7'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'center_x': .5, 'y': 0}
text: '8'
FloatLayout:
Button:
size_hint: None, None
pos_hint: {'right': 1, 'y': 0}
text: '9'
'''
class Application(App):
def build(self):
return Builder.load_string(KV)
if __name__ == "__main__":
Application().run()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment