Skip to content

Instantly share code, notes, and snippets.

@wasimafser
Last active May 7, 2020 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wasimafser/a8e05b7e1504db8422827d03312fcb85 to your computer and use it in GitHub Desktop.
Save wasimafser/a8e05b7e1504db8422827d03312fcb85 to your computer and use it in GitHub Desktop.
<SongScreen>:
name: 'song_screen'
BoxLayout:
orientation: 'vertical'
id: song_screen_bg
NowPlayingAlbumArt:
size: self.texture_size
size_hint: None, None
elevation: 10
pos_hint: {"center_x": .5, "center_y": .5}
id: album_art
BoxLayout:
orientation: 'horizontal'
size_hint_y: None
MDLabel:
id: song_cur_pos_label
size_hint: 0.2, 1
halign: "center"
MDSlider:
id: song_slider
min: 0
max: root.song_max_length
value: root.song_current_pos
hint: False
on_touch_up: root.seek_song() # HERE
MDLabel:
id: song_total_length_label
size_hint: 0.2, 1
halign: "center"
MDBottomAppBar:
MDToolbar:
id: song_screen_toolbar
title: root.song_name
icon: root.song_state
type: 'bottom'
left_action_items: [["android", lambda x: root.go_to_main()]]
on_action_button: root.toggle_song_play()
mode: 'center'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment