Book Image

Kivy: Interactive Applications in Python

By : Roberto Ulloa
4 (1)
Book Image

Kivy: Interactive Applications in Python

4 (1)
By: Roberto Ulloa

Overview of this book

Mobiles and tablets have brought with them a dramatic change in the utility of applications. Compatibility has become essential, and this has increased the kind of interaction that users expect: gestures, multi-touches, animations, and magic pens. Kivy is an open source Python solution that covers these market needs with an easy-to-learn and rapid development approach. Kivy is growing fast and gaining attention as an alternative to the established developing platforms. Kivy: Interactive Applications in Python quickly introduces you to the Kivy development methodology. You will learn some examples of how to use many of the Kivy components, as well as understand how to integrate and combine them into big projects. This book serves as a reference guide and is organized in such a way that once finished, you will have already completed your first project. You will start by learning the Kivy Language for building User Interfaces (UI) and vector figures. We then proceed to the uses of Kivy events and properties to glue the UI with the application logic. You then go on to build an entire User Interface (UI) starting from a hand-made sketch. Furthermore, you will go on to understand how to use the canvas and drawing instructions to create different types of geometrical figures. Finally, you will be introduced to a big set of interactive and smooth features: transformations (scale, rotate, and translate), gestures, animations, scheduling tasks, and multi-touch elements. Kivy: Interactive Applications in Python expands your knowledge by introducing various components that improve the User Experience (UX). Towards the end of the book, you will be confident to utilize Kivy components and strategies to start any application or game you have in mind.
Table of Contents (13 chapters)
Kivy: Interactive Applications in Python
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Summary


This chapter covered all the basic, and some not so basic, concepts of Kivy. You learned how to configure classes, instances, and templates. The following is a list of Kivy elements we used in this chapter:

  • We learned basic widgets such as Widget, Button, ToggleButton, and Label

  • Layouts such as FloatLayout, RelativeLayout, BoxLayout, GridLayout, StackLayout, and AnchorLayout

  • A number of properties such as pos, x, y, center_x, center_y, top, right, size, height, width, pos_hint, size_hint, group, spacing, padding, color, text, font_size, cols, rows, orientation, anchor_x, and anchor_y

  • We also learned variables such as self, root, and id and markup tags such as size, color, b, i, and sub

  • We used the Builder to load (the load_file method) extra Kivy language files.

There are much more elements that we can use inside the Kivy language. After this chapter we understand the general ideas and we should be able to use most of the elements available for the GUI design. There is, however, a very important and particular element that we haven't studied yet: the canvas, which mainly allow us to draw vector shapes (such as circles and lines for our project) in the screen. This will be the major topic of the next chapter.