forked from subhranil2699/facebook_clone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
home_page.kv
197 lines (159 loc) · 7.8 KB
/
home_page.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
#:import get_color_from_hex kivy.utils.get_color_from_hex
#:import AvatarImage components.avatar_image.AvatarImage
#:import ThreeButtons components.three_buttons.ThreeButtons
<HomePage>
# App background color
md_bg_color: 1, 1, 1, 1
MDBoxLayout:
orientation: 'vertical'
# Appbar
MDToolbar:
md_bg_color: 1, 1, 1, 1 # White
title: 'facebook'
specific_text_color: get_color_from_hex("#1777F2")
right_action_items: [["magnify"], ["facebook-messenger"]]
# Tab Icons
MDBoxLayout:
adaptive_size: True
height: 30
spacing: 25
MDIconButton:
icon: "home"
MDIconButton:
icon: "account-circle-outline"
MDIconButton:
icon: "account-group-outline"
MDIconButton:
icon: "bell-outline"
MDIconButton:
icon: "menu"
MDBoxLayout:
ScrollView:
bar_width: 0
MDBoxLayout:
adaptive_height: True
MDBoxLayout:
adaptive_height: True
orientation: 'vertical'
id: timeline
MDSeparator:
# Profile picture and update status button
MDBoxLayout:
orientation: "horizontal"
padding: 10
spacing: 20
adaptive_height: True
height: 100
# Profile Picture
AvatarImage:
source: root.profile_pic
# Update Status Button
MDRoundFlatButton:
text: "Write something here...\nWrite something here..."
size_hint: 1, 1
line_color: 0, 0, 0, 1
text_color: 0, 0, 0, 1
MDSeparator:
# Three buttons: Live, Photo and Reels
MDBoxLayout:
adaptive_height: True
height: 40
padding: 5
spacing: 10
# Live button
ThreeButtons:
text: "Live"
icon: "video"
icon_color: get_color_from_hex('#F2413D') # Red
MDSeparator:
size_hint_x: None
width: 1
height: 40
# Photo Button
ThreeButtons:
text: "Photo"
icon: "image-multiple"
icon_color: get_color_from_hex('#86BE49') # Green
MDSeparator:
size_hint_x: None
width: 1
height: 40
# Reels button
ThreeButtons:
text: "Reels"
icon: "movie-play"
icon_color: get_color_from_hex('#00A4F5') # Blue
MDSeparator:
size_hint_y: None
height: 12
# List of all online friends
ScrollView:
size_hint_y: None
height: 70
bar_width: 0
MDBoxLayout:
adaptive_width: True
spacing: 10
padding: 10
MDRoundFlatIconButton:
text: "Create\nRoom"
icon: "video-plus"
pos_hint: {'center_x': 0.5, 'center_y': 0.5}
# List of all online friends' images
MDBoxLayout:
adaptive_width: True
id: online_friends
padding: 10
spacing: 10
MDSeparator:
size_hint_y: None
height: 12
MDBoxLayout:
adaptive_height: True
padding: 10
height: 200
ScrollView:
size_hint_y: None
height: "190dp"
bar_width: 0
MDBoxLayout:
adaptive_width: True
spacing: 100
# Create Story Widget
MDRelativeLayout:
md_bg_color: 1, 1, 1, 1
size_hint_y: None
size: "110dp", "190dp"
MDRelativeLayout:
md_bg_color: get_color_from_hex("#EBEBEB")
radius: 15
pos_hint: {'top': 1, 'left': 1}
size_hint: None, None
size: "100dp", "190dp"
FitImage:
source: root.profile_pic
radius: [15, 15, 0, 0]
mipmap: True
size_hint: None, None
size: "100dp", "120dp"
pos_hint: {"top": 1, "left": 1}
FitImage:
source: "assets/images/plus.png"
pos_hint: {'center_x': 0.5, 'center_y': 0.35}
size_hint: None, None
size: 40, 40
MDLabel:
text: "Create Story"
theme_text_color: "Custom"
text_color: 0, 0, 0, 1
halign: 'center'
font_size: 14
pos_hint: {'center_x': 0.5, 'center_y': 0.1}
adaptive_height: True
# Friends' Stories
MDBoxLayout:
adaptive_width: True
id: stories
MDSeparator:
size_hint_y: None
height: 12