File: accelerometerdemo.kv

package info (click to toggle)
python-plyer 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,668 kB
  • sloc: python: 13,112; sh: 217; makefile: 177
file content (42 lines) | stat: -rw-r--r-- 950 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#:kivy 1.8.0
<AccelerometerDemo>:
    BoxLayout:
        orientation: 'vertical'
        padding: 20

        Graph:
            size_hint_y: 0.8
            id: graph_plot
            xlabel:'Time'
            ylabel:'Value'
            y_grid_label: True
            x_grid_label: True
            padding: 5
            xmin:0
            xmax:100
            ymin:-15
            ymax:20
        
        Button:
            id: toggle_button
            text: 'Start Accelerometer'
            size_hint_y: 0.2
            on_press: root.do_toggle()

<ErrorPopup>:
    size_hint: .7, .4
    title: "Error"
    
    BoxLayout:
        orientation: 'vertical'
        padding: 10
        spacing: 20

        Label:
            size_hint_y: 0.4
            text: "This feature has not yet been implemented on this platform."
        Button:
            text: 'Dismiss'
            size_hint_y: 0.4
            on_press: root.dismiss()