Repository navigation
Expand file tree
/
Copy pathstyles.kv
More file actions
101 lines (92 loc) · 3.04 KB
/
Copy pathstyles.kv
File metadata and controls
101 lines (92 loc) · 3.04 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#:kivy 2.1.0
<ScreenManagement>: # Initialize all the pages
MainPage:
PageOne:
PageTwo:
PageThree:
<MainPage>: # Initial Page
name: 'main'
MDScreen:
md_bg_color: app.theme_cls.bg_dark
MDLabel:
text: 'Main Page'
halign: 'center'
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
MDRectangleFlatButton:
text: 'Push-Ups'
pos_hint: {'center_x': 0.2, 'center_y': 0.08} # Button1 position
on_press:
root.manager.current = 'page_one'
root.manager.transition.direction = "left" # direction of the window slide
MDRectangleFlatButton:
text: 'Squats'
pos_hint: {'center_x': 0.5, 'center_y': 0.08} # Button2 position
on_press:
root.manager.current = 'page_two'
root.manager.transition.direction = "left" # direction of the window slide
MDRectangleFlatButton:
text: 'Sit Ups'
pos_hint: {'center_x': 0.8, 'center_y': 0.08} # Button3 position
on_press:
root.manager.current = 'page_three'
root.manager.transition.direction = "left" # direction of the window slide
<PageOne>:
name: 'page_one'
BoxLayout:
orientation: 'vertical'
MDTopAppBar:
title: "Camera"
MDLabel:
id: squat_label
text: "Push Ups counter: 0"
size_hint_y: 0.1
font_size: "30sp"
Image:
id: image
size_hint_y: 0.8
MDFloatingActionButton:
icon: "arrow-left"
pos_hint: {'center_x': 0.5, 'center_y': 0.1}
on_release:
app.root.current = 'main'
root.manager.transition.direction = "right" # direction of the window slide
<PageTwo>:
name: 'page_two'
BoxLayout:
orientation: 'vertical'
MDTopAppBar:
title: "Camera"
MDLabel:
id: squat_label
text: "Squats counter: 0"
size_hint_y: 0.1
font_size: "30sp"
Image:
id: image
size_hint_y: 0.8
MDFloatingActionButton:
icon: "arrow-left"
pos_hint: {'center_x': 0.5, 'center_y': 0.1}
on_release:
app.root.current = 'main'
root.manager.transition.direction = "right" # direction of the window slide
<PageThree>:
name: 'page_three'
BoxLayout:
orientation: 'vertical'
MDTopAppBar:
title: "Camera"
MDLabel:
id: squat_label
text: "Sit Ups counter: 0"
size_hint_y: 0.1
font_size: "30sp"
Image:
id: image
size_hint_y: 0.8
MDFloatingActionButton:
icon: "arrow-left"
pos_hint: {'center_x': 0.5, 'center_y': 0.1}
on_release:
app.root.current = 'main'
root.manager.transition.direction = "right" # direction of the window slide