Click here to Skip to main content
15,889,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,
In android studio:
There is a custom actionbar on top of an activity layer. It has the custom setting option and it shows navigation drawer.
I want it in other activities. Should I write codes in every activity?
How can I use it in all activities?

What I have tried:

Custom action bar and navigation drawer in all activities
Posted
Updated 10-Jan-18 3:26am

1 solution

Two options:
1. Have one main activity that contains the custom action bar and navigation drawer, then include other views as fragments to this main activity rather than as separate activities, Creating a Navigation Drawer | Android Developers[^] ; or
2. Have one base activity that contains the custom action bar and navigation drawer and extended by other activities, Android Developer: Android: Navigation Drawer with Multiple activities.[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900