-
Notifications
You must be signed in to change notification settings - Fork 0
/
musicapp.kv
153 lines (153 loc) · 5.91 KB
/
musicapp.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
<GUILayout>:
MDBottomNavigation:
id: bottom_nav
size_hint: 1, 1
MDBottomNavigationItem:
id: screen_1
name: "Screen 1"
text: "Youtube music player"
MDFloatLayout:
canvas.before:
Color:
rgba: (0, 0, 0, .3)
Rectangle:
pos: self.pos
size: self.size
size_hint: 1, 1
MDIconButton:
id: search_btt
text: "Search"
icon: "search-web"
pos_hint: {'center_x': 0.91, 'center_y': 0.93}
theme_text_color: "Custom"
text_color: app.theme_cls.primary_color
on_press: root.new_search()
MDTextField:
hint_text: "Round mode"
multiline: False
id: input_box
hint_text: "Enter Search"
size_hint_x: 0.7
pos_hint: {'center_x': 0.45, 'center_y': 0.93}
on_focus: self.show_keyboard()
on_text_validate: root.new_search()
MDLabel:
text: ''
id: song_title
font_size: dp(12)
size_hint_y: .03
layout_width: "wrap_content"
padding:[100,100]
pos_hint: {'center_x': .50, 'center_y': .80}
MDLabel:
text: ''
id: info
font_size: dp(12)
size_hint_y: .03
pos_hint:{'center_x': 0.60, 'center_y': 0.35}
MDLabel:
text: ''
id: song_position
size_hint_y: .03
pos_hint:{'center_x': 0.60, 'center_y': 0.3}
MDLabel:
text: ''
id: song_max
pos_hint:{'center_x': 1.30, 'center_y': 0.3}
MDIconButton:
id: shuffle_btt
icon: "shuffle"
pos_hint:{'center_x': 0.20, 'center_y': 0.15}
theme_text_color: "Custom"
text_color: (0, 0, 0, 1)
on_press: root.shuffle_song_check()
opacity: 0
md_bg_color: (0, 0, 0, 0)
disabled: True
MDIconButton:
id: repeat_btt
icon: "repeat"
pos_hint:{'center_x': 0.80, 'center_y': 0.15}
theme_text_color: "Custom"
text_color: (0, 0, 0, 1)
on_press: root.repeat_songs_check()
opacity: 0
md_bg_color: (0, 0, 0, 0)
disabled: True
MDIconButton:
id: pause_btt
icon: "pause"
pos_hint:{'center_x': 0.5, 'center_y': 0.15}
on_press: root.pause()
theme_text_color: "Custom"
opacity: 0
text_color: (1, 0, 0, 1)
md_bg_color: (0, 0, 0, 0)
disabled: True
MDIconButton:
id: play_btt
icon: "play"
pos_hint:{'center_x': 0.5, 'center_y': 0.15}
on_press: root.checkfile()
theme_text_color: "Custom"
opacity: 0
text_color: app.theme_cls.primary_color
md_bg_color: (0, 0, 0, 0)
disabled: True
MDIconButton:
id: next_btt
icon: "skip-next"
pos_hint:{'center_x': 0.65, 'center_y': 0.15}
on_press: root.next()
md_bg_color: (0, 0, 0, 0)
opacity: 0
disabled: True
MDIconButton:
id: previous_btt
icon: "skip-previous"
pos_hint:{'center_x': 0.35, 'center_y': 0.15}
on_press: root.previous()
md_bg_color: (0, 0, 0, 0)
opacity: 0
disabled: True
AsyncImage:
id: imageView
pos_hint: {'center_x': .5, 'center_y': .6}
size_hint_y: 0.3
size_hint_x: 0.3
source: root.image_path
allow_stretch: True
mipmap: True
MDBottomNavigationItem:
name: "Screen 2"
text: "Playlist"
MDBoxLayout:
orientation: "vertical"
md_bg_color: (0, 0, 0, 0.3)
size_hint: 1, 1
MDLabel:
text: 'Current Playlist'
id: play_list
size_hint_y: .06
padding: [10,10]
RecycleView:
id: rv
viewclass: 'RecycleViewRow'
data: []
RecycleBoxLayout:
default_size: None, dp(56)
default_size_hint: 1, None
size_hint_y: None
height: self.minimum_height
orientation: 'vertical'
<RecycleViewRow>:
orientation: 'horizontal'
Button:
text: root.text[:48] + "..." if len(root.text) >= 48 else root.text
font_size: 0.03 * self.width
padding: [10,10]
on_press: app.root.getting_song(message=root.text + ".m4a")
on_release: app.root.change_screen_item('Screen 1')
MDIconButton:
icon: "dots-vertical"
on_press: app.root.message_box(message=root.text + ".m4a")