Skip to content

Commit bd8087b

Browse files
authored
Add files via upload
1 parent 38c3e81 commit bd8087b

File tree

9 files changed

+235
-0
lines changed

9 files changed

+235
-0
lines changed

design2/icons/fitness.png

16 KB
Loading
4.62 KB
Loading

design2/icons/lotus.png

20.9 KB
Loading

design2/icons/meditation_bg.png

20.6 KB
Loading

design2/icons/muscle.png

31.8 KB
Loading

design2/icons/pose.png

33.7 KB
Loading
8.54 KB
Loading

design2/main.kv

Lines changed: 205 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,205 @@
1+
<RectangularElevationButton>:
2+
size_hint: (0.44, 0.09)
3+
elevation : 8
4+
md_bg_color : (1, 1, 1, 1)
5+
text_color : rgba('#9370DB')
6+
7+
<TodayScreenElevationButton>:
8+
#size_hint : (0.4, 0.25)
9+
width: dp(100)
10+
height : dp(100)
11+
elevation : 10
12+
md_bg_color : (1, 1, 1, 1)
13+
text_color : rgba('#FFC7B8F5')
14+
15+
<RectangularElevationListItem>:
16+
md_bg_color : (1, 1, 1, 1)
17+
size_hint: (0.9, None)
18+
elevation : 8
19+
20+
FloatLayout:
21+
MDBottomNavigation:
22+
23+
# Today Screen.
24+
25+
MDBottomNavigationItem:
26+
name : 'today'
27+
text : 'Today'
28+
icon : 'calendar-month-outline'
29+
canvas:
30+
Color:
31+
rgba : rgba('#FFC7B8F5')
32+
RoundedRectangle:
33+
size : self.size
34+
pos : self.pos
35+
Color:
36+
rgba : (1, 1, 1, 1)
37+
RoundedRectangle:
38+
size : self.size[0], self.size[1] - 0.45*self.size[1]
39+
Image :
40+
source: 'icons/undraw_pilates_gpdb.png'
41+
size_hint: (0.9, 0.8)
42+
pos_hint : {'center_x' : 0.3, 'center_y' : 0.78}
43+
MDLabel:
44+
text : 'Good Morning Aryan'
45+
font_style : 'H6'
46+
pos_hint : {'x' : 0.06, 'center_y' : 0.855}
47+
size_hint: (0.55, None)
48+
MDFloatingActionButton:
49+
icon : 'menu'
50+
md_bg_color : rgba('#FF817DC0')
51+
size_hint: (None, None)
52+
elevation : dp(1)
53+
pos : root.width - 1.5*self.width, root.height - 2.2*self.height
54+
MDTextFieldRound:
55+
hint_text : 'search'
56+
icon_left : 'magnify'
57+
size_hint: (0.6, 0.06)
58+
pos_hint: {'x': 0.1, 'center_y' : 0.725}
59+
color_mode : 'custom'
60+
normal_color : (1, 1, 1, 1)
61+
active_color : (1, 1, 1, 1)
62+
63+
# first button
64+
65+
TodayScreenElevationButton:
66+
pos_hint : {'center_x' : 0.25, 'center_y' : 0.515}
67+
Image:
68+
source: 'icons/muscle.png'
69+
size_hint: (0.18, 0.18)
70+
pos_hint: {'center_x' : 0.25, 'center_y' : 0.54}
71+
MDLabel:
72+
text : 'Diet Recommendation'
73+
font_size: '8sp'
74+
size_hint: (0.22, None)
75+
pos_hint: {'x' : 0.172, 'center_y' : 0.46}
76+
77+
# Second button
78+
79+
TodayScreenElevationButton:
80+
pos_hint : {'center_x' : 0.75, 'center_y' : 0.515}
81+
Image:
82+
source: 'icons/fitness.png'
83+
size_hint: (0.2, 0.2)
84+
pos_hint: {'center_x' : 0.75, 'center_y' : 0.54}
85+
MDLabel:
86+
text : 'Exercises'
87+
font_size: '8sp'
88+
size_hint: (0.22, None)
89+
pos_hint: {'x' : 0.69, 'center_y' : 0.46}
90+
91+
# Third button
92+
93+
TodayScreenElevationButton:
94+
pos_hint : {'center_x' : 0.25, 'center_y' : 0.24}
95+
Image:
96+
source: 'icons/lotus.png'
97+
size_hint: (0.2, 0.2)
98+
pos_hint: {'center_x' : 0.25, 'center_y' : 0.28}
99+
MDLabel:
100+
text : 'Meditation'
101+
font_size: '8sp'
102+
size_hint: (0.22, None)
103+
pos_hint: {'x' : 0.18, 'center_y' : 0.20}
104+
105+
# Fourth button
106+
107+
TodayScreenElevationButton:
108+
pos_hint : {'center_x' : 0.75, 'center_y' : 0.24}
109+
Image:
110+
source: 'icons/pose.png'
111+
size_hint: (0.2, 0.2)
112+
pos_hint: {'center_x' : 0.75, 'center_y' : 0.272}
113+
MDLabel:
114+
text : 'Yoga'
115+
font_size: '8sp'
116+
size_hint: (0.26, None)
117+
pos_hint: {'x' : 0.72, 'center_y' : 0.20}
118+
119+
# Exercise Screen.
120+
121+
MDBottomNavigationItem:
122+
name : 'all exercises'
123+
text : 'all exercises'
124+
font_size: '4sp'
125+
icon : 'dumbbell'
126+
canvas:
127+
Color:
128+
rgba : rgba('#c2c3dc')
129+
RoundedRectangle:
130+
size : self.size
131+
pos : self.pos
132+
Color:
133+
rgba : (1, 1, 1, 1)
134+
RoundedRectangle:
135+
size : self.size[0], self.size[1] - 0.55*self.size[1]
136+
pos : self.pos
137+
Image:
138+
source: 'icons/meditation_bg.png'
139+
#size_hint: (1, 1)
140+
size_hint_y: 0.4
141+
pos_hint: {'center_x': 0.5, 'center_y' : 0.808}
142+
MDTextFieldRound:
143+
size_hint: (None, 0.06)
144+
icon_left : 'magnify'
145+
pos_hint: {'center_x' : 0.25, 'center_y': 0.67}
146+
hint_text : 'search'
147+
color_mode : 'custom'
148+
normal_color : (1, 1, 1, 1)
149+
color_active : (1, 1, 1, 1)
150+
MDLabel:
151+
text : 'Meditation'
152+
font_style : 'H4'
153+
pos_hint: {'x': 0.06, 'center_y' : 0.9}
154+
MDLabel:
155+
text : '3-10 Min Course'
156+
font_style : 'Caption'
157+
pos_hint : {'x' : 0.06, 'center_y' : 0.83}
158+
MDLabel:
159+
text : 'Live happier and healthier by learning the fundamentals of Meditation and mindfulness'
160+
font_style : 'Body2'
161+
font_size: '9sp'
162+
size_hint: (0.55, None)
163+
pos_hint : {'x' : 0.06, 'center_y' : 0.76}
164+
RectangularElevationButton:
165+
text : 'Session 1'
166+
icon : 'play-circle-outline'
167+
pos_hint : {'center_x' : 0.26, 'center_y' : 0.559}
168+
RectangularElevationButton:
169+
text : 'Session 2'
170+
icon : 'play-circle-outline'
171+
pos_hint : {'center_x' : 0.75, 'center_y' : 0.559}
172+
RectangularElevationButton:
173+
text : 'Session 3'
174+
icon : 'play-circle-outline'
175+
pos_hint : {'center_x' : 0.26, 'center_y' : 0.449}
176+
RectangularElevationButton:
177+
text : 'Session 4'
178+
icon : 'play-circle-outline'
179+
pos_hint : {'center_x' : 0.75, 'center_y' : 0.449}
180+
RectangularElevationButton:
181+
text : 'Session 5'
182+
icon : 'play-circle-outline'
183+
pos_hint : {'center_x' : 0.26, 'center_y' : 0.339}
184+
RectangularElevationButton:
185+
text : 'Session 6'
186+
icon : 'play-circle-outline'
187+
pos_hint : {'center_x' : 0.75, 'center_y' : 0.339}
188+
MDLabel:
189+
text : 'Meditation'
190+
pos_hint: {'x' : 0.06, 'center_y': 0.235}
191+
RectangularElevationListItem:
192+
text : 'Alien'
193+
secondary_text : 'blah blah blah...'
194+
pos_hint: {'x': 0.06, 'center_y' : 0.135}
195+
IconLeftWidget:
196+
icon : 'icons/icons8-andorian-head-100.png'
197+
IconRightWidget:
198+
icon : 'lock-outline'
199+
200+
# This screen is going to be empty for now.
201+
202+
MDBottomNavigationItem:
203+
name : 'settings'
204+
text : 'Settings'
205+
icon : 'settings-outline'

design2/main.py

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
from kivy.lang import Builder
2+
3+
from kivymd.app import MDApp
4+
from kivymd.theming import ThemeManager
5+
from kivymd.uix.list import TwoLineAvatarIconListItem
6+
from kivymd.uix.behaviors import (
7+
BackgroundColorBehavior,
8+
RectangularElevationBehavior,
9+
)
10+
11+
from kivymd.uix.button import MDFillRoundFlatButton, MDFillRoundFlatIconButton
12+
13+
class RectangularElevationButton(RectangularElevationBehavior,
14+
MDFillRoundFlatIconButton):
15+
md_bg_color = [0, 0, 1, 1]
16+
17+
class TodayScreenElevationButton(RectangularElevationBehavior,
18+
MDFillRoundFlatButton):
19+
pass
20+
21+
class RectangularElevationListItem(RectangularElevationBehavior,
22+
BackgroundColorBehavior,
23+
TwoLineAvatarIconListItem):
24+
md_bg_color = [1, 1, 1, 1]
25+
26+
class MyApp(MDApp):
27+
def build(self):
28+
return Builder.load_file('main.kv')
29+
30+
MyApp().run()

0 commit comments

Comments
 (0)