I've been trying to create a simple application for android, and I've started working on the GUI first.
However, after I finished the tutorial, and tried implementing my own GUI, it stopped working.
The official documentation does not focus on .kv files, answers found in other questions here on SO all have different answers, and I am just lost.
All I need is the root widget, which has a white rectangle the size of the screen, to be rendered. Below is the minimum reproducable code.
I've tried:
- changing
canvastoCanvas, andcanvas.beforeas written in another answer from SO. - Building the app using
Builder.load_file() - Changing the
build()override topass
None worked.
Any help is appreciated.
My KV File (GutTrust.kv)
#:kivy 1.0.1
gutScreen:
Canvas:
Color:
rgba: 1, 1, 1, 1
Rectangle:
pos: self.pos
size: self.size
#Many more elements but they are unnessesary for the demonstration.
My Python File (main.py)
from kivy.app import App
from kivy.uix.widget import Widget
class gutScreen(Widget):
"""Background"""
pass
class GutTrustApp(App):
def build(self):
return gutScreen()
if __name__ == '__main__':
GutTrustApp().run()