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: | |
| Label: | |
| id: the_label | |
| text: 'some default text' | |
| Button: | |
| text: '-> yay' | |
| on_press: the_label.text = 'yay' | |
| Button: | |
| text: '-> yvik' | |
| on_press: the_label.text = 'kivy'[::-1] |
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.boxlayout import BoxLayout | |
| from kivy.lang import Builder | |
| from kivy.properties import StringProperty | |
| Builder.load_string(''' | |
| <Simple>: | |
| Label: | |
| #text: 'Hello World' # THIS IS WORKING | |
| text: root.sometext |
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.base import runTouchApp | |
| from kivy.uix.widget import Widget | |
| from kivy.properties import ListProperty | |
| from kivy.lang import Builder | |
| Builder.load_string(''' | |
| <DrawingWidget>: | |
| canvas: |
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
| import kivy | |
| from kivy.app import App | |
| from kivy.clock import Clock | |
| from kivy.graphics import Rectangle, Ellipse | |
| from kivy.uix.widget import Widget | |
| from kivy.graphics.fbo import Fbo | |
| from kivy.utils import get_random_color | |
| from kivy.animation import Animation | |
| from kivy.core.image import Image | |
| from kivy.graphics import Color |
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
| <SomeRule>: | |
| new_property: 'something' | |
| type: OptionProperty | |
| options: ['something', 'something_else'] |
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.base import runTouchApp | |
| from kivy.properties import ListProperty | |
| from kivy.lang import Builder | |
| from kivy.uix.effectwidget import EffectWidget, EffectBase, AdvancedEffectBase, InvertEffect | |
| effect_string = ''' | |
| uniform vec2 touch; |
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.effectwidget import EffectWidget | |
| from kivy.uix.image import Image | |
| from kivy.uix.floatlayout import FloatLayout | |
| from kivy.uix.scatter import Scatter | |
| from kivy.uix.button import Button | |
| from kivy.uix.spinner import Spinner | |
| from kivy.uix.boxlayout import BoxLayout | |
| from kivy.lang import Builder | |
| from kivy.properties import ObjectProperty |
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.lang import Builder | |
| from kivy.base import runTouchApp | |
| from kivy.network.urlrequest import UrlRequest | |
| from kivy.uix.label import Label | |
| class ShowyLabel(Label): | |
| def get_input(self, *args): | |
| print 'did get_input!' | |
| print 'args are', args | |
| self.text = str(args) |
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: | |
| AnchorLayout: | |
| GridLayout: | |
| size_hint_x: None | |
| width: self.minimum_width | |
| cols: 2 | |
| Image: | |
| id: image | |
| source: 'whatever' | |
| size_hint_x: 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
| from kivy.uix.widget import Widget | |
| from kivy.lang import Builder | |
| from kivy.clock import Clock | |
| from kivy.base import runTouchApp | |
| class Scrolling(Widget): | |
| def __init__(self, **kwargs): | |
| super(Scrolling, self).__init__(**kwargs) | |
| self.canvas.children[-1].texture.wrap = 'repeat' |