I am making a music player for android and now I am successful to play and pause the song but the
problem is that as in other music player app like Spotify or Google Play Music we have a slider
at the bottom and we can use that slider to control the currently playing song
So the point is that want to do the same and I want to add a slider which also work like a PROGRESS BAR and we can use that progress bar to control the song playing I tried this and ended up with this code -:
from kivymd.app import MDApp
from kivymd.uix.screen import Screen
from kivymd.uix.slider import MDSlider
class MusicApp(MDApp):
def build(self):
a = mixer.Sound(filename)
slider = MDSlider(min=0,max=total_length,value = 0,
pos_hint={'center_x':0.50,'center_y':0.6},
size_hint=(0.6,0.1))
screen = Screen()
screen.add_widget(slider)
return screen
MusicApp().run()
Can anyone help me out with this
Thanks in advance