Reputation: 7359
I'm trying to implement a custom header menu (like a site nav) in my Android application and I'm wondering what the standard or best practice for creating a header menu? I'm thinking something like the facebook app that displays a logo and has some action items like triggering a search and possibly return back to the main activity. These are too be present at the top of my app in every activity, without the user having to click a button on the device.
Tab Layout doesn't seem to be what I'm looking for.
I found a tutorial here that might be close to what I'm looking for but not sure. It seems a bit redundant to instantiate a menu in every Activity. Seems like there would be a way to decouple the Activity from the menu, or at least more loosely couple it.
Perhaps I need to implement something with Fragments but I'm sort of new, so I'm not sure yet. Looking forward to your suggestions or hearing how you've implemented something like this. Thanks!
Upvotes: 0
Views: 4954
Reputation: 36302
Sounds like you're looking for the ActionBar pattern. See this old question and do your own Googling to find out more.
Upvotes: 1