forked from dimi3o/MobAdaptUi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.kv
86 lines (73 loc) · 2.7 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
#:kivy 1.8.0
#:import KivyLexer kivy.extras.highlight.KivyLexer
#:import Factory kivy.factory.Factory
<MainScreen>:
ScrollView:
do_scroll_x: False
do_scroll_y: False if root.fullscreen else (content.height > root.height - dp(16))
AnchorLayout:
size_hint_y: None
height: root.height if root.fullscreen else max(root.height, content.height)
# GridLayout:
# id: content
# cols: 1
# spacing: '8dp'
# padding: '8dp'
# size_hint: (1, 1) if root.fullscreen else (.8, None)
# height: self.height if root.fullscreen else self.minimum_height
BoxLayout:
id: content
orientation: "vertical"
padding: 10
size_hint: (1, 1) if root.fullscreen else (.8, None)
height: self.height if root.fullscreen else self.minimum_height
#size_hint_y: None
#height: '48dp'
BoxLayout:
orientation: 'vertical'
canvas.before:
Color:
rgb: .6, .6, .6
Rectangle:
size: self.size
#source: 'data/background.png'
ActionBar:
ActionView:
id: av
ActionPrevious:
#with_previous: (False if sm.current_screen.name == 'button' else True) if sm.current_screen else False
title: 'Adaptive Mobile User Interface'
on_release: app.go_hierarchy_previous()
ActionToggleButton:
text: 'Toggle sourcecode'
icon: 'data/icons/bug.png'
on_release: app.toggle_emulation()
important: True
ActionToggleButton:
text: 'left'
group: 'g1'
icon: 'data/icons/left.png'
on_release: app.on_toggle_left_right()
ActionToggleButton:
text: 'right'
state: 'down'
group: 'g1'
icon: 'data/icons/right.png'
on_release: app.on_toggle_left_right()
ActionToggleButton:
text: 'top'
group: 'g2'
icon: 'data/icons/top.png'
on_release: app.on_toggle_top_bottom()
ActionToggleButton:
text: 'bottom'
state: 'down'
group: 'g2'
icon: 'data/icons/bottom.png'
on_release: app.on_toggle_top_bottom()
ScreenManager:
id: sm
on_current_screen:
#spnr.text = args[1].name
idx = app.screen_names.index(args[1].name)
if idx > -1: app.hierarchy.append(args[1])