This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| in kv: | |
| <CustomWidget1>: | |
| id: custom_widget_1 | |
| size_hint_y: None | |
| height: 0 | |
| <CustomWidget2>: | |
| size_hint_y: None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BoxLayout: | |
| orientation: 'vertical' | |
| ListView: | |
| adapter: ListAdapter(data=listomatic()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ./distribute.sh -m "numpy kivy" | |
| Check build dependencies for arch | |
| Avoid check build dependencies, unknow platform arch | |
| Check enviromnent | |
| SDK located at /opt/android-sdk | |
| NDK located at /opt/android-ndk | |
| NDK version is r9 | |
| API level set to 14 | |
| Check mandatory tools | |
| Distribution will be located at /home/asandy/devel/python-for-android/dist/default |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from kivy.app import App | |
| from kivy.uix.widget import Widget | |
| from kivy.uix.boxlayout import BoxLayout | |
| from kivy.uix.button import Button | |
| from kivy.properties import NumericProperty, ReferenceListProperty, ObjectProperty, ListProperty, AliasProperty, StringProperty, DictProperty, BooleanProperty, StringProperty, OptionProperty | |
| from kivy.graphics.texture import Texture | |
| from random import randint | |
| class TextureDemo(Widget): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def go_to_nearest(order_entries): | |
| slides = self.slides | |
| slide_no = len(slides) | |
| indices = [slides.index(order_page) for order_page in order_entries] | |
| current_index = slides.index(self.current_slide) | |
| distances = [order_index - current_index for order_index in indices] | |
| distances = [d - slide_no if d > slide_no/2. else d for d in distances] | |
| min_distance = 1000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <MyButton@Button>: | |
| color: .8,.9,0,1 | |
| font_size: 32 | |
| <HBoxWidget>: | |
| BoxLayout: | |
| size: root.size | |
| pos: root.pos | |
| orientation: 'horizontal' | |
| MyButton: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from kivy.app import App | |
| from kivy.uix.scatter import Scatter | |
| from kivy.uix.label import Label | |
| from kivy.uix.floatlayout import FloatLayout | |
| class TutorialApp(App): | |
| def build(self): | |
| f = FloatLayout() | |
| s = Scatter() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from kivy.app import App | |
| from kivy.uix.scatter import Scatter | |
| from kivy.uix.label import Label | |
| from kivy.uix.floatlayout import FloatLayout | |
| class TutorialApp(App): | |
| def build(self): | |
| f = FloatLayout() | |
| s = Scatter() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from kivy.app import App | |
| from kivy.uix.scatter import Scatter | |
| from kivy.uix.label import Label | |
| from kivy.uix.floatlayout import FloatLayout | |
| from kivy.uix.textinput import TextInput | |
| from kivy.uix.boxlayout import BoxLayout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| if ( | |
| long_condition_one and | |
| long_condition_two or | |
| long_condition_3): | |
| print "Hello" | |