Text is one of the most commonly used contents used in the apps. The recipe will create an app with a label widget where we will use text rendering to make our Hello World.
We are going to use one simple Python files that will just show our Hello World text. To complete the recipe:
Import the usual
kivy
packages.Also, import the label package.
Define the
e9app
class instanced as app.Define the method
build()
to the class.Return the label widget with our
Hello World
text.import kivy kivy.require('1.9.0') # Code tested in this version! from kivy.app import App from kivy.uix.label import Label class e9App(App): def build(self): return Label(text='Hello [ref=world][color=0000ff]World[/color][/ref]', markup=True, font_size=80, font_name='DroidSans') if __name__ == '__main__': e9App().run()