-
-
Save mrroot5/8e8c641d2ce4ddabf943d17a9ae3c88f to your computer and use it in GitHub Desktop.
Nesting Grid Layouts in Kivy
This file contains hidden or 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
#!/usr/bin/env python3 | |
# App to magane a bot with a webcam | |
# Py modules | |
import requests | |
# Kivy imports | |
import kivy | |
kivy.require('1.9.1') # replace with your current kivy version ! | |
# Kivy modules | |
from kivy.app import App | |
from kivy.uix.boxlayout import BoxLayout | |
import kivy.uix.gridlayout as gridl | |
class VideoGrid(gridl.GridLayout): | |
pass | |
class ButtonsGrid(gridl.GridLayout): | |
apiURL = 'https://api.github.com/' | |
def forward(self, btn): | |
print(btn.text) | |
# r = requests.get(self.apiURL + "events") | |
# response = r.json() | |
# print(response) | |
def right(self, btn): | |
print(btn.text) | |
# r = requests.get(self.apiURL + "events") | |
# response = r.json() | |
# print(response) | |
def back(self, btn): | |
print(btn.text) | |
# r = requests.get(self.apiURL + "events") | |
# response = r.json() | |
# print(response) | |
def left(self, btn): | |
print(btn.text) | |
# r = requests.get(self.apiURL + "events") | |
# response = r.json() | |
# print(response) | |
class ContainerBox(BoxLayout): | |
pass | |
class ButtonsGridApp(App): | |
def build(self): | |
return ContainerBox() | |
if __name__ == '__main__': | |
ButtonsGridApp().run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment