From 8e4c326570943515d2653eb79160b888d721a1ce Mon Sep 17 00:00:00 2001 From: Mathieu Virbel Date: Thu, 27 Feb 2014 18:17:04 +0100 Subject: [PATCH] examples: add a camera example (easy for testing the camera widget) --- examples/camera/main.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/camera/main.py diff --git a/examples/camera/main.py b/examples/camera/main.py new file mode 100644 index 000000000..5d87f04b1 --- /dev/null +++ b/examples/camera/main.py @@ -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()