How do we share Drawer
with all the activities?
In the lister: onNavigationItemSelected
of setNavigationItemSelectedListener
we can
I found the answer using this SO answer
Extending is the right way. Just override setContentView in the right way...
I am a bit confused here as well. After finding very little information on this I tried to extend my subclass
public class NewActivity extends MainActivity{
...
}
However, this alone didn't do anything. the MainActivity
has a fully functioning NavigationView
that will navigate to each activity..Only thing that is left is sharing it with each activity.