examples: add a camera example (easy for testing the camera widget)

This commit is contained in:
Mathieu Virbel 2014-02-27 18:17:04 +01:00
parent cc43da571c
commit 8e4c326570
1 changed files with 25 additions and 0 deletions

25
examples/camera/main.py Normal file
View File

@ -0,0 +1,25 @@
#from kivy.logger import Logger
#import logging
#Logger.setLevel(logging.TRACE)
from kivy.app import App
from kivy.lang import Builder
kv = '''
BoxLayout:
orientation: 'vertical'
Camera:
id: camera
resolution: (640, 480)
play: False
ToggleButton:
text: 'Play'
on_press: camera.play = not camera.play
size_hint_y: None
height: '48dp'
'''
class TestCamera(App):
def build(self):
return Builder.load_string(kv)
TestCamera().run()