Sharing NavigationView with all the Activities?

后端 未结 2 1035
感情败类
感情败类 2021-02-14 17:06

How do we share Drawer with all the activities?

In the lister: onNavigationItemSelected of setNavigationItemSelectedListener we can

2条回答
  •  后悔当初
    2021-02-14 17:46

    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.

提交回复
热议问题