This file contains 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
# Newer Kivy versions include a Gtk+3 clipboard, and CEF will try to use Gtk+2, which | |
# causes an error. Importing Gtk from gi first fixes the issue. | |
try: | |
from gi.repository import Gtk | |
except ImportError: | |
pass | |
# cefpython import overwrites LD_LIBRARY_PATH. Bad module, BAD! | |
env_ld_library_path = os.environ.get('LD_LIBRARY_PATH', None) | |
from cefpython3 import cefpython # must be imported FIRST due to a tc_malloc hook |
This file contains 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.switch import Switch | |
from jnius import autoclass | |
Camera = autoclass('android.hardware.Camera') | |
Parameters = autoclass('android.hardware.Camera$Parameters') | |
__version__ = '0.1' |
This file contains 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 | |
kivy.require('1.9.0') | |
from kivy.app import App | |
from kivy.lang import Builder | |
root = Builder.load_string(''' | |
<Message@BoxLayout>: | |
name: '' | |
message: '' |
This file contains 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
class HTML2Markup(object): | |
html_bool = { | |
'true': True, | |
't': True, | |
'1': True, | |
'yes': True, | |
'y': True, | |
'false': False, | |
'f': False, | |
'0': False, |
This file contains 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
FloatLayout: | |
Widget: | |
canvas: | |
Color: | |
rgba: 1, 0, 0, 1 | |
Line: | |
points: [btn.center_x, btn.center_y, 500, 500] # NameError: name 'btn' is not defined | |
Button: | |
id: btn |
This file contains 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 | |
kivy.require('1.9.0') | |
from kivy.app import App | |
from kivy.uix.anchorlayout import AnchorLayout | |
from kivy.uix.stacklayout import StackLayout | |
from kivy.uix.button import Button | |
from kivy.uix.widget import Widget | |
from kivy.metrics import dp |
This file contains 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 | |
kivy.require('1.9.0') | |
from kivy.app import App | |
from kivy.lang import Builder | |
root = Builder.load_string(''' | |
AnchorLayout: | |
anchor_x: 'left' | |
StackLayout: |
This file contains 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
<FLayout>: | |
canvas.before: | |
Color: | |
rgba: 0.5, 0.5, 0.5, 1 | |
Rectangle: | |
pos: self.pos | |
size: self.size |
This file contains 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
<Separator@Widget>: | |
size_hint_y: None | |
height: dp(6) | |
color: 1, 1, 1, 1 | |
background_image: '' | |
canvas: | |
Color: | |
rgba: root.color | |
Rectangle: |
This file contains 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
[app] | |
# (str) Title of your application | |
title = mqtt test | |
# (str) Package name | |
package.name = mqtttest | |
# (str) Package domain (needed for android/ios packaging) | |
package.domain = org.kivy |