Skip to content Skip to sidebar Skip to footer

Sharing NavigationView With All The Activities?

How do we share Drawer with all the activities? In the lister: onNavigationItemSelected of setNavigationItemSelectedListener we can get the id and navigate to it. What I am looking

Solution 1:

I found the answer using this SO answer

Extending is the right way. Just override setContentView in the right way...


Solution 2:

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.


Post a Comment for "Sharing NavigationView With All The Activities?"