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.factory import Factory | |
| from kivy.app import runTouchApp | |
| KV_CODE = ''' | |
| #:import random random | |
| #:import Button kivy.uix.button.Button | |
| <DebugCarousel@Carousel>: |
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.factory import Factory | |
| from kivy.app import runTouchApp | |
| KV_CODE = ''' | |
| <DebugCarousel@Carousel>: | |
| canvas.before: | |
| Clear: | |
| canvas.after: |
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
| ''' | |
| pip install kivy kivymd | |
| ''' | |
| from kivy.lang import Builder | |
| from kivy.properties import StringProperty | |
| from kivymd.app import MDApp | |
| from kivymd.uix.label import MDLabel | |
| from kivymd.uix.snackbar.snackbar import MDSnackbar |
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
| Moved to https://github.com/asyncgui/asynckivy |
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 functools import wraps | |
| def yieldsleep(widget): | |
| def func(create_gen): | |
| @wraps(create_gen) | |
| def func2(*args, **kwargs): | |
| gen = create_gen(*args, **kwargs) | |
| def sleep(milliseconds): |
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 runTouchApp | |
| from kivy.lang import Builder | |
| from kivy.uix.button import Button | |
| from kivy.garden.moretransitions import ( | |
| PixelTransition, RippleTransition, BlurTransition, RVBTransition, | |
| RotateTransition, TileTransition, FastSlideTransition, | |
| ) | |
| ALL_TRANSITIONS = ( | |
| PixelTransition, RippleTransition, BlurTransition, RVBTransition, |
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.config import Config | |
| Config.set('graphics', 'width', 400) | |
| Config.set('graphics', 'height', 300) | |
| from kivy.app import runTouchApp | |
| from kivy.lang import Builder | |
| runTouchApp(Builder.load_string(''' | |
| FloatLayout: | |
| Button: | |
| text: 'Kivy' |
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
| # case A ... 'stop_property()' affects to the next part of the animation | |
| # case B ... 'stop_property()' doesn't affect to the next part of the animation | |
| # | |
| # This behavior confuses users. | |
| from kivy.animation import Animation | |
| from kivy.app import runTouchApp | |
| from kivy.uix.widget import Widget | |
| from kivy.uix.button import Button | |
| from kivy.clock import Clock |
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
| # This script shows you a situation that 'Animation._instances' keeps getting | |
| # fat. I'm not sure this should be fixed or not. | |
| import gc | |
| from kivy.animation import Animation | |
| from kivy.app import runTouchApp | |
| from kivy.uix.widget import Widget | |
| from kivy.clock import Clock | |
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 __future__ import print_function | |
| from kivy.config import Config | |
| Config.set('kivy', 'pause_on_minimize', 1) | |
| # Config.set('graphics', 'fullscreen', 1) | |
| from kivy.app import App | |
| from kivy.factory import Factory | |
| from kivy.graphics.texture import Texture | |
| import kivy.core.window | |
| from sys import stderr |