-
Notifications
You must be signed in to change notification settings - Fork 2
/
wall.kv
86 lines (78 loc) · 2.11 KB
/
wall.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.9
#:import LinearRecycleLayoutManager recycleview.LinearRecycleLayoutManager
<ImagePost>:
canvas.before:
Color:
rgba: root.background_color
Rectangle:
size: self.size
Label:
id: timestamp
text: self.parent.timestamp + '\n' + self.parent.from_person
#text: root.timestamp
pos_hint: {'center_x': 1.0/6}
AsyncImage:
id: content
pos_hint: {'center_x': 2.0/3, 'center_y': .5}
size_hint: (1, 0.9)
allow_stretch: False
source: root.image_path
<TextPost>:
canvas.before:
Color:
rgba: root.background_color
Rectangle:
size: self.size
Label:
id: timestamp
text: self.parent.timestamp + '\n' + self.parent.from_person
pos_hint: {'center_x': 1.0/6, 'center_y': .5}
size_hint: (1, 0.9)
Label:
id: content
pos_hint: {'center_x': 2.0/3}
text_size: self.parent.width/2.0, None
text: root.label_text
<PostWall>:
id: rv
layout_manager: LinearRecycleLayoutManager(orientation="vertical", default_size=root.height/5, key_size='height')
key_viewclass: 'viewclass'
canvas.before:
Color:
rgb: (1, 0, 0)
Rectangle:
pos: self.width*2.0/3-1, 0
size: 3, self.height
Rectangle:
pos: self.width*1.0/3-1, 0
size: 3, self.height
Color:
rgb: (1, 0, 0)
Rectangle:
pos: self.width*2.0/3-1, 0
size: 3, self.height
Rectangle:
pos: 0, self.center_y - 1
size: self.width, 3
Color:
rgb: (0, 0, 1)
Rectangle:
pos: self.width*1.0/6, 0
size: 1, self.height
<PostCarousel>:
id: car
#canvas.before:
# Color:
# rgb: (1, 1, 1)
# Rectangle:
# size: self.width, self.height
<PostScreenManager>:
id: sm
Screen:
name: 'Wall screen'
PostWall:
id: pw
Screen:
name: 'Carousel screen'
PostCarousel:
id: pc