Kivy Cookbook
eBook - ePub

Kivy Cookbook

Hugo Solis

Share book
  1. 246 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Kivy Cookbook

Hugo Solis

Book details
Book preview
Table of contents
Citations

About This Book

Enhance your skills in developing multi-touch applications with Kivy

About This Book

  • Create most diverse apps and learn how to distribute them with the help of the Kivy framework
  • Explore Kivy API to develop user interfaces and control multi-touch events
  • Step-by-step recipes that provide deeper understanding of the Kivy 1.9.0 framework
  • Build and use your own events, widgets and gestures using features and tools in Kivy

Who This Book Is For

This book is intended for developers who want to use features of the Kivy framework and develop multi-touch applications. Prior experience with Kivy is not required, although familiarity with Python is expected.

What You Will Learn

  • Access widgets defined inside Kv language in your Python code
  • Handle Kivy events to control widgets, touches, the mouse, the keyboard, and animations
  • Recognize touch shapes and detecting multi-tapping
  • Create custom events and declare properties
  • Organizing your layouts while working with the ActionBar
  • Store and retrieve the coordinate space context
  • Create your own shader and render in a framebuffer
  • Leverage Factory objects, multi-touch in iOS and multi-touch in Android

In Detail

Kivy is an open-source Python library for rapid development of applications that make use of innovative user interfaces, such as multi-touch apps. It is a promising Python framework to develop UI and UX apps in a cross-platform environment, under the Python philosophy.

Kivy Cookbook is a practical book that will guide you through the Kivy framework to develop apps and get your apps ready for distribution in App Store and Android devices.

You will start off with installing Kivy and building your interfaces. You will learn how to work the accelerometer and create custom events. Then, you will understand how to use the basics, buttons, labels and text inputs and manipulate the widget tree. Next, you will be able to work with manipulating instructions, create an atlas and layouts. Moving on, you will learn packing for Windows and packing for iOS, and use TestDrive.

By the end of the book, you will have learnt in detail the relevant features and tools in Kivy and how to create portable packages to distribute your apps in the most used platforms.

Style and approach

This is an easy-to-follow practical guide packed with graspable recipes that cover important tasks to be performed while developing multi-touch applications with Kivy. All the code used in each recipe is explained in detail.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is Kivy Cookbook an online PDF/ePUB?
Yes, you can access Kivy Cookbook by Hugo Solis in PDF and/or ePUB format, as well as other popular books in Informatique & Développement d'applications. We have over one million books available in our catalogue for you to explore.

Information

Year
2015
ISBN
9781783987382

Kivy Cookbook


Table of Contents

Kivy Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why Subscribe?
Free Access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Sections
Getting ready
How to do it…
How it works…
There's more…
See also
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Kivy and the Kv Language
Introduction
Installing Kivy
Getting ready
How to do it…
How it works…
There's more…
Mac OS X
Microsoft Windows
See also
Building your interfaces
Getting ready
How to do it…
How it works…
There's more…
See also
Declaring properties within a class
Getting ready
How to do it…
How it works…
There's more…
See also
Relating Python code and the Kv language
Getting ready
How to do it…
How it works…
There's more…
See also
Referencing widgets
Getting ready
How to do it…
How it works…
There's more…
See also
Accessing widgets defined inside the Kv language in your Python code
Getting ready
How to do it…
How it works…
See also
Reusing styles in multiple widgets
Getting ready
How to do it…
How it works…
There's more…
See also
Designing with the Kv language
Getting ready
How to do it…
How it works…
There's more…
See also
Running your code
Getting ready
How to do it…
How it works…
There's more…
Mac OS X
Microsoft Windows
See also
Using Kivy garden
Getting ready
How to do it…
There's more…
Packing
2. Input, Motion, and Touch
Introduction
Using the mouse
Getting ready
How to do it…
How it works…
There's more…
See also
Evolving to the touchscreen
Getting ready
How to do it…
How it works…
There's more…
See also
Working with the accelerometer
Getting ready
How to do it…
How it works…
There's more…
See also
Using the gyroscope
Getting ready
How to do it…
How it works…
See also
The differences between the touch and motion events
Getting ready
How to do it…
How it works…
There's more…
See also
Recognizing touch shapes
Getting ready
How to do it…
How it works…
See also
Detecting multitapping
Getting ready
How to do it…
How it works…
Grabbing touch events
Getting ready
How to do it…
How it works…
Recording gestures
Getting ready
How to do it…
How it works…
There's more…
See also
3. Events
Introduction
Scheduling a one-time event
Getting ready
How to do it…
How it works…
There's more…
See also
Scheduling a repetitive event
Getting ready
How to do it…
How it works…
There's more…
See also
Triggering events
Getting ready
How to do it…
How it works…
There's more…
See also
Defining widget events
Getting ready
How to do it…
How it works…
There's more…
See also
Creating custom events
Getting ready
How to do it…
How it works…
There's more…
See also
Attaching callbacks
Getting ready
How to do it…
How it works…
See also
Declaring a property
Getting ready
How to do it…
How it works…
There's more…
See also
Compounding properties
Getting ready
How to do it…
How it works…
There's more…
See also
4. Widgets
Introduction
Using the basics: buttons, labels, and text inputs
Getting ready
How to do it…
How it works…
There's more…
See also
Manipulating the widget tree
Getting ready
How to do it…
How it works…
There's more…
See also
Traversing the tree
Getting ready
How to do it…
How it works…
Using swappable widgets
Getting ready
How to do it…
How it works…
See also
Organizing with layouts
Getting ready
How to do it…
How it works…
There's more…
Using FloatLayout
Getting ready
How to do it…
How it works…
There's more…
See also
Using BoxLayout
Getting ready
How to do it…
How it works…
There's more…
Using GridLayout
How to do it…
How it works…
There's more…
Using StackLayout
Getting ready
How to do it…
How it works…
There's more…
Using RelativeLayout
Getting ready
How to do it…
How it works…
Using AnchorLayout
How to do it…
How it works…
Working with ActionBar
Getting ready
How to do it…
How it works…
See also
5. Graphics – Canvas and Instructions
Introduction
Separating with the screen manager
Getting ready
How to do it…
How it works…
There's more…
Using drawing instructions
Getting ready
How to do it…
How it works…
There's more…
Using context instructions
Getting ready
How to do it…...

Table of contents