How to show mini controller at bottom or persisten

2019-02-21 20:43发布

问题:

I'm developing an app that can play video from youtube or other live streaming, if a user pressed back/home button, a user can hear the audio only and then they can back to see the video again. I have created a service that holds player and does all things. In my whole application, there are many activities and fragments.

Question :

I want to show mini controller at the bottom of every screen while something is playing, you can refer application like Spotify, google play, and other music applications. These applications show a mini controller when a user leaves their main media player activity/fragment. How I can achieve that feature in my current application. Note : my application contains many activities and fragment. So there is not only one main activity.

What I have tried to find possible solution :

1) First link, here they are suggesting to use only one activity in whole application and other are fragments only, that's not possible in my case.

2) Collapsing Bottom Bar (like Google Music) in Android : here they are suggesting to about collapsing and expanding bottom bar, I am looking for this animation too, but one more thing is that how I can persistent bottom bar in a whole application when user navigates to other screens.

3) AndroidSlidingUpPanel, this library will helpful for me? To make persistent bottom bar throughout the application?

Can anybody please tell me how they are handling this thing throughout the whole application?

You can find below image, which gives you clear idea, what exactly I am looking for.

MiniController image :