Im looking for a way to make a top bar consistent across activities, allmost like a frame in HTML. I thought I had found the solution when reading about action bar, but when after further investigation I understands it’s activity dependent as any other standard layout.
So my quetsion is what’s the benefit of using action bar instead of making a top bar in the activities layout?
Other then that, if you have any suggestion on how to make a top bar that lives independantly across activities it would be very appreciated.
The Actionbar handles a lot of stuff for you. For example it manages tabs and other view switching behaviour and displays OptionsMenuItems to you.
There is no way to create a view that is not destroyed during an activity switch. Activities are very independent parts of an App that are loosely coupled through Intents only. The only way to do something like this is to write all your state of the tob bar to an Intent and send it to all new Activities that you are starting. You then can recreate the top bar while setting up the activity.