├── .gitignore ├── 01_buildingblocks └── main.py ├── 02_kivylanguage ├── main.py └── workout.kv ├── 03_buttonsAndBinding ├── main.py └── workout.kv ├── 04_nestedLayouts ├── main.py ├── samples │ ├── main.py │ └── workout.kv └── workout.kv ├── 05_screenManager ├── main.py └── workout.kv ├── LICENSE.md ├── README.md ├── bin ├── Tutorialworkoutapp-0.1.0-debug.apk ├── Tutorialworkoutapp-0.2.0-debug.apk ├── Tutorialworkoutapp-0.3.0-debug.apk └── Tutorialworkoutapp-0.4.0-debug.apk ├── buildozer.spec ├── intro_kivy.odp ├── intro_kivy.pdf └── test.py /.gitignore: -------------------------------------------------------------------------------- 1 | *.~*~ -------------------------------------------------------------------------------- /01_buildingblocks/main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | 3 | from kivy.uix.gridlayout import GridLayout 4 | from kivy.uix.label import Label 5 | from kivy.uix.textinput import TextInput 6 | 7 | 8 | class MainScreen(GridLayout): 9 | def __init__(self,**kwargs): 10 | super(MainScreen,self).__init__(**kwargs) # implements the features of a GridLayout (the base class of MinScreen) 11 | self.cols=3 12 | 13 | l1=Label(text='Workout') 14 | l2=Label(text='Day') 15 | l3=Label(text='Time') 16 | 17 | in1=TextInput(multiline=False) # multiline determines if more than one line of text is allowed (optional argument) 18 | in2=TextInput(multiline=False) 19 | in3=TextInput(multiline=False) 20 | 21 | self.add_widget(l1) # Adds widgets to the layout 22 | self.add_widget(l2) 23 | self.add_widget(l3) 24 | self.add_widget(in1) 25 | self.add_widget(in2) 26 | self.add_widget(in3) 27 | 28 | 29 | class WorkoutApp(App): # Inherits all properties of App 30 | def build(self): 31 | return MainScreen() 32 | 33 | 34 | if __name__=='__main__': 35 | WorkoutApp().run() # run() is a method of kivy App class 36 | 37 | 38 | -------------------------------------------------------------------------------- /02_kivylanguage/main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | 3 | from kivy.uix.gridlayout import GridLayout 4 | 5 | 6 | class MainScreen(GridLayout): 7 | def __init__(self,**kwargs): 8 | super(MainScreen,self).__init__(**kwargs) # implements the features of a GridLayout (the base class of MainScreen) 9 | 10 | 11 | class WorkoutApp(App): 12 | def build(self): 13 | return MainScreen() 14 | 15 | 16 | if __name__=='__main__': 17 | WorkoutApp().run() 18 | -------------------------------------------------------------------------------- /02_kivylanguage/workout.kv: -------------------------------------------------------------------------------- 1 | : 2 | cols: 3 3 | Label: 4 | text: 'Workout' 5 | size_hint_x: 2/3. 6 | Label: 7 | text: 'Day' 8 | size_hint_x: 1/6. 9 | Label: 10 | text: 'Time' 11 | size_hint_x: 1/6. 12 | 13 | TextInput: 14 | size_hint_x: 2/3. 15 | 16 | TextInput: 17 | size_hint_x: 1/3. 18 | 19 | TextInput: 20 | size_hint_x: 1/6. 21 | 22 | 23 | TextInput: 24 | multiline: False -------------------------------------------------------------------------------- /03_buttonsAndBinding/main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | from kivy.app import Widget 3 | 4 | from kivy.uix.gridlayout import GridLayout 5 | 6 | 7 | class MainScreen(GridLayout): 8 | def __init__(self,**kwargs): 9 | super(MainScreen,self).__init__(**kwargs) # implements the features of a GridLayout (the base class of MainScreen) 10 | 11 | def save(self): 12 | '''Saves the data from the input to a text file. 13 | It is bound to the save button''' 14 | status1 = self.ids.checkbox1.active #active is boolean (True or False) 15 | workout1 = self.ids.workoutInput1.text 16 | day1 = self.ids.dayInput1.text 17 | time1 = self.ids.timeInput1.text 18 | 19 | status2 = self.ids.checkbox2.active 20 | workout2 = self.ids.workoutInput2.text 21 | day2 = self.ids.dayInput2.text 22 | time2 = self.ids.timeInput2.text 23 | 24 | status3 = self.ids.checkbox3.active 25 | workout3 = self.ids.workoutInput3.text 26 | day3 = self.ids.dayInput3.text 27 | time3 = self.ids.timeInput3.text 28 | with open('workoutData.txt','a') as f: 29 | f.write('%s, %s, %s, %s\n' %(status1, workout1, day1, time1)) 30 | f.write('%s, %s, %s, %s\n' %(status2, workout2, day2, time2)) 31 | f.write('%s, %s, %s, %s\n' %(status3, workout3, day3, time3)) 32 | 33 | return None 34 | 35 | 36 | class WorkoutApp(App): 37 | def build(self): 38 | return MainScreen() 39 | 40 | 41 | if __name__=='__main__': 42 | WorkoutApp().run() 43 | 44 | 45 | 46 | # NOTE: running is diff on diff platforms 47 | # python main.py 48 | # kivy main.py 49 | -------------------------------------------------------------------------------- /03_buttonsAndBinding/workout.kv: -------------------------------------------------------------------------------- 1 | : 2 | cols: 4 3 | Label: 4 | text: 'Status' 5 | size_hint_x: 1/8. 6 | Label: 7 | text: 'Workout' 8 | size_hint_x: 5/8. 9 | Label: 10 | text: 'Day' 11 | size_hint_x: 1/8. 12 | Label: 13 | text: 'Time' 14 | size_hint_x: 1/8. 15 | 16 | 17 | 18 | CheckBox: 19 | id: checkbox1 20 | size_hint_x: 1/8. 21 | 22 | TextInput: 23 | id: workoutInput1 24 | size_hint_x: 5/8. 25 | 26 | TextInput: 27 | id: dayInput1 28 | size_hint_x: 1/8. 29 | 30 | TextInput: 31 | id: timeInput1 32 | size_hint_x: 1/8. 33 | 34 | 35 | 36 | CheckBox: 37 | id: checkbox2 38 | size_hint_x: 1/8. 39 | 40 | TextInput: 41 | id: workoutInput2 42 | size_hint_x: 5/8. 43 | 44 | TextInput: 45 | id: dayInput2 46 | size_hint_x: 1/8. 47 | 48 | TextInput: 49 | id: timeInput2 50 | size_hint_x: 1/8. 51 | 52 | 53 | CheckBox: 54 | id: checkbox3 55 | size_hint_x: 1/8. 56 | 57 | TextInput: 58 | id: workoutInput3 59 | size_hint_x: 5/8. 60 | 61 | TextInput: 62 | id: dayInput3 63 | size_hint_x: 1/8. 64 | 65 | TextInput: 66 | id: timeInput3 67 | size_hint_x: 1/8. 68 | 69 | 70 | Button: 71 | size_hint_x: 1/8. 72 | text: 'Save' 73 | on_press: root.save() 74 | 75 | TextInput: 76 | multiline: False -------------------------------------------------------------------------------- /04_nestedLayouts/main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | from kivy.app import Widget 3 | 4 | from kivy.uix.gridlayout import GridLayout 5 | from kivy.uix.boxlayout import BoxLayout 6 | 7 | 8 | class MainScreen(BoxLayout): 9 | def __init__(self,**kwargs): 10 | super(MainScreen,self).__init__(**kwargs) # implements the features of a GridLayout (the base class of MainScreen) 11 | 12 | def save(self): 13 | '''Saves the data from the input to a text file. 14 | It is bound to the save button''' 15 | status = self.ids.workout1.ids.status.active 16 | workout = self.ids.workout1.ids.workoutInput.text 17 | day = self.ids.workout1.ids.dayInput.text 18 | time = self.ids.workout1.ids.timeInput.text 19 | with open('workoutData.txt','a') as f: 20 | f.write('%s, %s, %s, %s\n' %(status, workout, day, time)) 21 | 22 | return None 23 | 24 | def totalTime(self): 25 | '''This function doesn't do anything right now! Add code to compute the total exercise time, and document it in this string''' 26 | return None 27 | 28 | 29 | 30 | class WorkoutLayout(BoxLayout): 31 | pass 32 | 33 | 34 | class WorkoutApp(App): 35 | def build(self): 36 | return MainScreen() 37 | 38 | 39 | if __name__=='__main__': 40 | WorkoutApp().run() 41 | 42 | 43 | 44 | # NOTE: running is diff on diff platforms 45 | # python main.py 46 | # kivy main.py 47 | -------------------------------------------------------------------------------- /04_nestedLayouts/samples/main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | from kivy.app import Widget 3 | 4 | from kivy.uix.gridlayout import GridLayout 5 | from kivy.uix.boxlayout import BoxLayout 6 | 7 | 8 | class MainScreen(BoxLayout): 9 | def __init__(self,**kwargs): 10 | super(MainScreen,self).__init__(**kwargs) # implements the features of a GridLayout (the base class of MainScreen) 11 | 12 | def save(self): 13 | '''Saves the data from the input to a text file. 14 | It is bound to the save button''' 15 | for i in self.ids: #loops over the items in self.ids 16 | try: 17 | # each element self.ids[i] is an object with its own ids 18 | status = self.ids[i].ids['status'].active 19 | workout = self.ids[i].ids['workoutInput'].text 20 | day = self.ids[i].ids['dayInput'].text 21 | time = self.ids[i].ids['timeInput'].text 22 | with open('workoutData.txt','a') as f: 23 | f.write('%s, %s, %s, %s\n' %(status, workout, day, time)) 24 | 25 | except: 26 | # Include this to catch any error 27 | # in case some ids are not workouts! 28 | pass 29 | 30 | return None 31 | 32 | def totalTime(self): 33 | '''This function doesn't do anything right now! Add code to compute the total exercise time, and document it in this string''' 34 | return None 35 | 36 | 37 | 38 | class WorkoutLayout(BoxLayout): 39 | pass 40 | 41 | 42 | class WorkoutApp(App): 43 | def build(self): 44 | return MainScreen() 45 | 46 | 47 | if __name__=='__main__': 48 | WorkoutApp().run() 49 | 50 | 51 | 52 | # NOTE: running is diff on diff platforms 53 | # python main.py 54 | # kivy main.py 55 | -------------------------------------------------------------------------------- /04_nestedLayouts/samples/workout.kv: -------------------------------------------------------------------------------- 1 | : 2 | orientation: 'vertical' 3 | BoxLayout: 4 | orientation: 'horizontal' 5 | Label: 6 | text: 'Workout' 7 | size_hint_x: 2/3. 8 | Label: 9 | text: 'Day' 10 | size_hint_x: 1/6. 11 | Label: 12 | text: 'Time' 13 | size_hint_x: 1/6. 14 | 15 | WorkoutLayout: 16 | id: workout1 17 | WorkoutLayout: 18 | id: workout2 19 | WorkoutLayout: 20 | id: workout3 21 | WorkoutLayout: 22 | id: workout4 23 | WorkoutLayout: 24 | id: workout5 25 | WorkoutLayout: 26 | id: workout6 27 | WorkoutLayout: 28 | id: workout7 29 | 30 | Button: 31 | text: 'Save' 32 | on_press: root.save() 33 | 34 | 35 | : 36 | size_hint_x: 1 37 | orientation: 'horizontal' 38 | CheckBox: 39 | id: status 40 | size_hint_x: 1/8. 41 | TextInput: 42 | id: workoutInput 43 | size_hint_x: 5/8. 44 | TextInput: 45 | id: dayInput 46 | size_hint_x: 1/8. 47 | TextInput: 48 | id: timeInput 49 | size_hint_x: 1/8. 50 | 51 | TextInput: 52 | multiline: False -------------------------------------------------------------------------------- /04_nestedLayouts/workout.kv: -------------------------------------------------------------------------------- 1 | : 2 | orientation: 'vertical' 3 | BoxLayout: 4 | orientation: 'horizontal' 5 | Label: 6 | text: 'Workout' 7 | size_hint_x: 2/3. 8 | Label: 9 | text: 'Day' 10 | size_hint_x: 1/6. 11 | Label: 12 | text: 'Time' 13 | size_hint_x: 1/6. 14 | 15 | WorkoutLayout: 16 | id: workout1 17 | WorkoutLayout: 18 | id: workout2 19 | WorkoutLayout: 20 | id: workout3 21 | WorkoutLayout: 22 | id: workout4 23 | WorkoutLayout: 24 | id: workout5 25 | WorkoutLayout: 26 | id: workout6 27 | WorkoutLayout: 28 | id: workout7 29 | 30 | Button: 31 | text: 'Save' 32 | on_press: root.save() 33 | 34 | 35 | : 36 | size_hint_x: 1 37 | orientation: 'horizontal' 38 | CheckBox: 39 | id: status 40 | size_hint_x: 1/8. 41 | TextInput: 42 | id: workoutInput 43 | size_hint_x: 5/8. 44 | TextInput: 45 | id: dayInput 46 | size_hint_x: 1/8. 47 | TextInput: 48 | id: timeInput 49 | size_hint_x: 1/8. 50 | 51 | TextInput: 52 | multiline: False -------------------------------------------------------------------------------- /05_screenManager/main.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | from kivy.app import Widget 3 | 4 | from kivy.uix.gridlayout import GridLayout 5 | from kivy.uix.boxlayout import BoxLayout 6 | from kivy.uix.screenmanager import ScreenManager, Screen 7 | 8 | 9 | class MainScreen(Screen): 10 | def __init__(self,**kwargs): 11 | super(MainScreen,self).__init__(**kwargs) # implements the features of a GridLayout (the base class of MainScreen) 12 | 13 | def save(self): 14 | '''Saves the data from the input to a text file. 15 | It is bound to the save button''' 16 | status = self.ids.workout1.ids.status.active 17 | workout = self.ids.workout1.ids.workoutInput.text 18 | day = self.ids.workout1.ids.dayInput.text 19 | time = self.ids.workout1.ids.timeInput.text 20 | with open('workoutData.txt','a') as f: 21 | f.write('%s, %s, %s, %s\n' %(status, workout, day, time)) 22 | 23 | return None 24 | 25 | def totalTime(self): 26 | '''This function doesn't do anything right now! Add code to compute the total exercise time, and document it in this string''' 27 | return None 28 | 29 | class WorkoutLayout(BoxLayout): 30 | pass 31 | 32 | class SecondScreen(Screen): 33 | pass 34 | 35 | class AppScreenManager(ScreenManager): 36 | pass 37 | 38 | class WorkoutApp(App): 39 | def build(self): 40 | sm = AppScreenManager() 41 | sm.add_widget(MainScreen(name='main')) 42 | sm.add_widget(SecondScreen(name='secondary')) 43 | return sm 44 | 45 | if __name__=='__main__': 46 | WorkoutApp().run() 47 | 48 | 49 | 50 | # NOTE: running is diff on diff platforms 51 | # python main.py 52 | # kivy main.py 53 | -------------------------------------------------------------------------------- /05_screenManager/workout.kv: -------------------------------------------------------------------------------- 1 | : 2 | BoxLayout: 3 | orientation: 'vertical' 4 | BoxLayout: 5 | orientation: 'horizontal' 6 | Label: 7 | text: 'Workout' 8 | size_hint_x: 2/3. 9 | Label: 10 | text: 'Day' 11 | size_hint_x: 1/6. 12 | Label: 13 | text: 'Time' 14 | size_hint_x: 1/6. 15 | 16 | WorkoutLayout: 17 | id: workout1 18 | WorkoutLayout: 19 | id: workout2 20 | WorkoutLayout: 21 | id: workout3 22 | WorkoutLayout: 23 | id: workout4 24 | WorkoutLayout: 25 | id: workout5 26 | WorkoutLayout: 27 | id: workout6 28 | WorkoutLayout: 29 | id: workout7 30 | 31 | BoxLayout: 32 | orientation: 'horizontal' 33 | Button: 34 | text: 'Save' 35 | on_press: root.save() 36 | Button: 37 | text: 'Next screen' 38 | on_press: root.manager.current = 'secondary' 39 | 40 | : 41 | BoxLayout: 42 | orientation: 'vertical' 43 | Label: 44 | size_hint_y: 3/4. 45 | text: 'Hello second screen!' 46 | Button: 47 | size_hint: (1/4.,1/4.) 48 | text: 'Back to main screen' 49 | on_press: root.manager.current = 'main' 50 | 51 | : 52 | size_hint_x: 1 53 | orientation: 'horizontal' 54 | CheckBox: 55 | id: status 56 | size_hint_x: 1/8. 57 | TextInput: 58 | id: workoutInput 59 | size_hint_x: 5/8. 60 | TextInput: 61 | id: dayInput 62 | size_hint_x: 1/8. 63 | TextInput: 64 | id: timeInput 65 | size_hint_x: 1/8. 66 | 67 | TextInput: 68 | multiline: False -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The slides are provided under a Creative Commons Attribution 4.0 License 2 | 3 | Creative Commons License
Introduction to Kivy by Ashley DaSilva is licensed under a Creative Commons Attribution 4.0 International License. 4 | 5 | ----------- 6 | 7 | All software is distributed under the MIT License: 8 | 9 | The MIT License (MIT) 10 | 11 | Copyright (c) 2014 Ashley DaSilva 12 | 13 | Permission is hereby granted, free of charge, to any person obtaining a copy 14 | of this software and associated documentation files (the "Software"), to deal 15 | in the Software without restriction, including without limitation the rights 16 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 17 | copies of the Software, and to permit persons to whom the Software is 18 | furnished to do so, subject to the following conditions: 19 | 20 | The above copyright notice and this permission notice shall be included in all 21 | copies or substantial portions of the Software. 22 | 23 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 24 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 25 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 26 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 27 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 28 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 29 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Introduction to kivy 2 | ==================== 3 | 4 | A project based introduction to kivy. The sample project is a workout logging app. 5 | 6 | This is meant to be an instructor-guided introduction to kivy for an audience who is familiar with the basics of python. It should also work as a self-guided introduction. The presentation first gives an overview of kivy, then is divided into topics. For each topic, there is sample code and a working version of the app in the corresponding folder (see below). The presentation also includes a brief description of ways to package for android, with a focus on the buildozer tool. There is a packaged android version of the app for each topic in the bin folder. 7 | 8 | For each topic, the presentation gives an explanation of the existing code followed by an exercise for the audience to work through. The topics are: 9 | 10 | 01: building blocks: Explains the building blocks of kivy using only python 11 | 12 | 02: kivy language: Introduces the kivy language 13 | 14 | 03: buttons and binding: How to add buttons and bind functions to them 15 | 16 | 04: nested layouts: Nesting layouts can not only provide structure, but decrease repetition 17 | 18 | 05: screen manager: (No slides yet) Using screen manager for multiple screens -------------------------------------------------------------------------------- /bin/Tutorialworkoutapp-0.1.0-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adasilva/intro_kivy/596579d6576ef6ed42b1c7e74f877cc61483e2e3/bin/Tutorialworkoutapp-0.1.0-debug.apk -------------------------------------------------------------------------------- /bin/Tutorialworkoutapp-0.2.0-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adasilva/intro_kivy/596579d6576ef6ed42b1c7e74f877cc61483e2e3/bin/Tutorialworkoutapp-0.2.0-debug.apk -------------------------------------------------------------------------------- /bin/Tutorialworkoutapp-0.3.0-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adasilva/intro_kivy/596579d6576ef6ed42b1c7e74f877cc61483e2e3/bin/Tutorialworkoutapp-0.3.0-debug.apk -------------------------------------------------------------------------------- /bin/Tutorialworkoutapp-0.4.0-debug.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adasilva/intro_kivy/596579d6576ef6ed42b1c7e74f877cc61483e2e3/bin/Tutorialworkoutapp-0.4.0-debug.apk -------------------------------------------------------------------------------- /buildozer.spec: -------------------------------------------------------------------------------- 1 | [app] 2 | 3 | # (str) Title of your application 4 | title = Tutorial workout app 5 | 6 | # (str) Package name 7 | package.name = workoutapp 8 | 9 | # (str) Package domain (needed for android/ios packaging) 10 | package.domain = org.test 11 | 12 | # (str) Source code where the main.py live 13 | source.dir = ./04_nestedLayouts/ 14 | 15 | # (list) Source files to include (let empty to include all the files) 16 | source.include_exts = py,png,jpg,kv,atlas 17 | 18 | # (list) Source files to exclude (let empty to not exclude anything) 19 | #source.exclude_exts = spec 20 | 21 | # (list) List of directory to exclude (let empty to not exclude anything) 22 | #source.exclude_dirs = tests, bin 23 | 24 | # (list) List of exclusions using pattern matching 25 | #source.exclude_patterns = license,images/*/*.jpg 26 | 27 | # (str) Application versioning (method 1) 28 | #version.regex = __version__ = ['"](.*)['"] 29 | #version.filename = %(source.dir)s/main.py 30 | 31 | # (str) Application versioning (method 2) 32 | version = 0.4.0 33 | 34 | # (list) Application requirements 35 | requirements = kivy 36 | 37 | # (list) Garden requirements 38 | #garden_requirements = 39 | 40 | # (str) Presplash of the application 41 | #presplash.filename = %(source.dir)s/data/presplash.png 42 | 43 | # (str) Icon of the application 44 | #icon.filename = %(source.dir)s/data/icon.png 45 | 46 | # (str) Supported orientation (one of landscape, portrait or all) 47 | orientation = all 48 | 49 | # (bool) Indicate if the application should be fullscreen or not 50 | fullscreen = 1 51 | 52 | 53 | # 54 | # Android specific 55 | # 56 | 57 | # (list) Permissions 58 | #android.permissions = INTERNET 59 | 60 | # (int) Android API to use 61 | #android.api = 14 62 | 63 | # (int) Minimum API required (8 = Android 2.2 devices) 64 | #android.minapi = 8 65 | 66 | # (int) Android SDK version to use 67 | #android.sdk = 21 68 | 69 | # (str) Android NDK version to use 70 | #android.ndk = 9c 71 | 72 | # (bool) Use --private data storage (True) or --dir public storage (False) 73 | #android.private_storage = True 74 | 75 | # (str) Android NDK directory (if empty, it will be automatically downloaded.) 76 | #android.ndk_path = 77 | 78 | # (str) Android SDK directory (if empty, it will be automatically downloaded.) 79 | #android.sdk_path = 80 | 81 | # (str) python-for-android git clone directory (if empty, it will be automatically cloned from github) 82 | #android.p4a_dir = 83 | 84 | # (list) python-for-android whitelist 85 | #android.p4a_whitelist = 86 | 87 | # (str) Android entry point, default is ok for Kivy-based app 88 | #android.entrypoint = org.renpy.android.PythonActivity 89 | 90 | # (list) List of Java .jar files to add to the libs so that pyjnius can access 91 | # their classes. Don't add jars that you do not need, since extra jars can slow 92 | # down the build process. Allows wildcards matching, for example: 93 | # OUYA-ODK/libs/*.jar 94 | #android.add_jars = foo.jar,bar.jar,path/to/more/*.jar 95 | 96 | # (list) List of Java files to add to the android project (can be java or a 97 | # directory containing the files) 98 | #android.add_src = 99 | 100 | # (str) python-for-android branch to use, if not master, useful to try 101 | # not yet merged features. 102 | #android.branch = master 103 | 104 | # (str) OUYA Console category. Should be one of GAME or APP 105 | # If you leave this blank, OUYA support will not be enabled 106 | #android.ouya.category = GAME 107 | 108 | # (str) Filename of OUYA Console icon. It must be a 732x412 png image. 109 | #android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png 110 | 111 | # (str) XML file to include as an intent filters in tag 112 | #android.manifest.intent_filters = 113 | 114 | # (list) Android additionnal libraries to copy into libs/armeabi 115 | #android.add_libs_armeabi = libs/android/*.so 116 | #android.add_libs_armeabi_v7a = libs/android-v7/*.so 117 | #android.add_libs_x86 = libs/android-x86/*.so 118 | #android.add_libs_mips = libs/android-mips/*.so 119 | 120 | # (bool) Indicate whether the screen should stay on 121 | # Don't forget to add the WAKE_LOCK permission if you set this to True 122 | #android.wakelock = False 123 | 124 | # (list) Android application meta-data to set (key=value format) 125 | #android.meta_data = 126 | 127 | # (list) Android library project to add (will be added in the 128 | # project.properties automatically.) 129 | #android.library_references = 130 | 131 | # 132 | # iOS specific 133 | # 134 | 135 | # (str) Name of the certificate to use for signing the debug version 136 | # Get a list of available identities: buildozer ios list_identities 137 | #ios.codesign.debug = "iPhone Developer: ()" 138 | 139 | # (str) Name of the certificate to use for signing the release version 140 | #ios.codesign.release = %(ios.codesign.debug)s 141 | 142 | 143 | [buildozer] 144 | 145 | # (int) Log level (0 = error only, 1 = info, 2 = debug (with command output)) 146 | log_level = 1 147 | 148 | # (int) Display warning if buildozer is run as root (0 = False, 1 = True) 149 | warn_on_root = 1 150 | 151 | 152 | # ----------------------------------------------------------------------------- 153 | # List as sections 154 | # 155 | # You can define all the "list" as [section:key]. 156 | # Each line will be considered as a option to the list. 157 | # Let's take [app] / source.exclude_patterns. 158 | # Instead of doing: 159 | # 160 | # [app] 161 | # source.exclude_patterns = license,data/audio/*.wav,data/images/original/* 162 | # 163 | # This can be translated into: 164 | # 165 | # [app:source.exclude_patterns] 166 | # license 167 | # data/audio/*.wav 168 | # data/images/original/* 169 | # 170 | 171 | 172 | # ----------------------------------------------------------------------------- 173 | # Profiles 174 | # 175 | # You can extend section / key with a profile 176 | # For example, you want to deploy a demo version of your application without 177 | # HD content. You could first change the title to add "(demo)" in the name 178 | # and extend the excluded directories to remove the HD content. 179 | # 180 | # [app@demo] 181 | # title = My Application (demo) 182 | # 183 | # [app:source.exclude_patterns@demo] 184 | # images/hd/* 185 | # 186 | # Then, invoke the command line with the "demo" profile: 187 | # 188 | # buildozer --profile demo android debug 189 | -------------------------------------------------------------------------------- /intro_kivy.odp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adasilva/intro_kivy/596579d6576ef6ed42b1c7e74f877cc61483e2e3/intro_kivy.odp -------------------------------------------------------------------------------- /intro_kivy.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/adasilva/intro_kivy/596579d6576ef6ed42b1c7e74f877cc61483e2e3/intro_kivy.pdf -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | from kivy.app import App 2 | from kivy.app import Widget 3 | 4 | from kivy.uix.floatlayout import FloatLayout 5 | from kivy.uix.label import Label 6 | 7 | 8 | class UserInfoScreen(FloatLayout): 9 | def __init__(self,**kwargs): 10 | super(UserInfoScreen,self).__init__(**kwargs) 11 | self.add_widget(Label(text='Test was a success!')) 12 | 13 | class TodoApp(App): 14 | def build(self): 15 | return UserInfoScreen() 16 | 17 | 18 | if __name__=='__main__': 19 | TodoApp().run() 20 | 21 | --------------------------------------------------------------------------------