I was doing some brainstorming and I suddenly got an idea which would make my situation a whole lot easier.
Basically, I want a music player visible on all my activities at the bottom of the screen. To do so I created a Fragment which does the job fine, but it’s a real pain adding it on all activities manually. Especially on the ListActivities this seems problematic.
So I was thinking, is it possible to create one activity in which all other activities will be opened?
Think of a main overlay (FrameLayout) that contains a single view, and the music player fragment. The current main screen gets opened in this view, and the same goes for all activities originating from this main screen.
Would anything like this be possible? It sounds like a really simple idea in my head, but as far as I can remember I’ve never seen anything like it which makes me think it might not be possible.
Idea

What you could do is have just one
Activityand then run everything else inFragments.All your
Activitywhat need to handle is replacing the contentFragment.I find myself short on words right now, so if you have any questions as to what I mean, feel free to shoot.