-
Notifications
You must be signed in to change notification settings - Fork 3
/
main.kv
208 lines (204 loc) · 4.35 KB
/
main.kv
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<HomeScreen>
RelativeLayout:
id: layer
BoxLayout:
orientation: 'vertical'
id: homescreen
AnchorLayout:
canvas:
Color:
rgba: 0.5,0.5,0.5,1
Rectangle:
pos: self.pos
size: self.size
size_hint: 1,None
height: '1cm'
min_height: '1cm'
anchor_x: 'right'
Button:
size_hint: None, 1
width: self.height
on_release: root.openGearMenu()
background_color: 0.5,0.5,0.5,1
background_normal:''
BoxLayout:
pos: self.parent.pos
size: self.parent.size
Image:
source: './img/ic_more_vert_white_48dp.png'
ScrollView:
StackLayout:
size_hint: 1, None
height: self.minimum_height
id: fileList
spacing: '0.1cm'
BoxLayout:
size_hint: 1, None
height: '1cm'
Button:
id:button3
background_color: 0.5,0.5,0.5,1
background_normal:''
on_release: root.startCamera()
BoxLayout:
size: self.parent.size
pos: self.parent.pos
Image:
source: './img/ic_videocam_white_48dp.png'
<FileWidget>
canvas:
Color:
rgba: 0.2,0.2,0.2,1
Rectangle:
pos: self.pos
size: self.size
size_hint: 1, None
height: '2.4cm'
Image:
size_hint: None, 1
width: '1.35cm'
id:img
RelativeLayout:
AnchorLayout:
anchor_x: 'center'
anchor_y: 'center'
Button:
background_color: 0.6,0.6,0.6,1
background_normal: ''
anchor_x: 'center'
anchor_y: 'center'
id: filebutton
text: root.name
on_release: root.pressed()
AnchorLayout:
anchor_x:'right'
anchor_y:'top'
BoxLayout:
size_hint: None, None
anchor_x: 'right'
anchor_y: 'center'
width: '0.8cm'
height: self.width*3
orientation:"vertical"
id: button_layout
ToggleButton:
background_color: 0.6,0.6,0.6,1
background_normal: ''
border: 15, 15, 15, 15
id:nfc_toggler
on_state: root.toggle_nfc(self.state)
BoxLayout:
size: self.parent.size
pos: self.parent.pos
Image:
source: './img/ic_tap_and_play_white_48dp.png'
Button:
background_color: 0.6,0.6,0.6,1
background_normal: ''
id: editBut
BoxLayout:
pos: self.parent.pos
size: self.parent.size
Image:
source: 'img/ic_edit_white_48dp.png'
Button:
background_color: 0.6,0.6,0.6,1
background_normal: ''
id: eraseBut
on_release: root.delete()
BoxLayout:
pos: self.parent.pos
size: self.parent.size
Image:
source: 'img/ic_delete_white_48dp.png'
#ToggleButton:
# text: 'T'
# id:tribler_toggler
<SearchScreen>
BoxLayout:
orientation: "vertical"
id: searchscreen
AnchorLayout:
canvas:
Color:
rgba: 0.5,0.5,0.5,1
Rectangle:
pos: self.pos
size: self.size
BorderImage:
pos: self.pos
size: self.size
border: 1,1,1,1
size_hint: 1,None
height: '1cm'
min_height: '1cm'
TextInput:
id: searchfield
size_hint: 1, None
height: '0.7cm'
font_size: "16sp"
multiline: False
hint_text: "Search"
keyboard_suggestions: True
valign: 'middle'
on_text: root.on_txt_input()
ScrollView:
StackLayout:
size_hint: 1, None
height: self.minimum_height
id: fileList
<CamScreen>
BoxLayout:
orientation: 'vertical'
id: camScreen
AnchorLayout:
align_x: 'center'
align_y: 'center'
size_hint: 1,1
id: anchor
Image:
source:''
opacity: 0
CameraWidget:
id: camera
BoxLayout:
size_hint_y: None
height: '1cm'
Button:
background_color: 0.5,0.5,0.5,1
background_normal:''
text: ''
on_release: app.goBack()
BoxLayout:
pos: self.parent.pos
size: self.parent.size
Image:
source: 'img/ic_videocam_off_white_48dp.png'
<GearMenu>
RelativeLayout:
Button:
opacity: 0
on_press: root.screen.ids.layer.remove_widget(root)
AnchorLayout:
padding: '0.2cm'
anchor_x: 'right'
anchor_y: 'top'
BoxLayout:
on_touch_up: root.screen.ids.layer.remove_widget(root)
orientation:"vertical"
size_hint: None,None
width: '2cm'
height:'3cm'
Button:
text:'Test'
on_release:root.screen.AndroidTest()
Button:
text: "Download"
on_release: app.swap_to(app.SearchScr)
background: None
Button:
text: 'Add Video'
on_release: root.screen.addVideo()
Button:
text:'Cam Test'
on_release:app.swap_to(app.CamScr)