So i have extended this DrawerActivity to other activities and I can see the Navigation bar in the extended activities but the on item click listener doesnt work. This is the drawer activity
public class DrawerActivity extends AppCompatActivity {
    public DrawerLayout mDrawarlayout;
    public ActionBarDrawerToggle mToggle;
    public NavigationView mNavigationView;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_drawer);
        mDrawarlayout = findViewById(R.id.drawer_layout);
        mToggle = new ActionBarDrawerToggle(this, mDrawarlayout, R.string.open, R.string.close);
        mDrawarlayout.addDrawerListener(mToggle);
        mNavigationView = findViewById(R.id.navigationView);
        mToggle.syncState();
        getSupportActionBar().setDisplayHomeAsUpEnabled(true);
        setupDrawerContent(mNavigationView);
    }
    public void selectItemDrawer(MenuItem menuItem) {
        switch (menuItem.getItemId()) {
            case R.id.settings_drawer:
                Toast.makeText(getApplicationContext(), "Clicked", Toast.LENGTH_LONG).show();
                Intent anIntent = new Intent(getApplicationContext(), PatientSettingsActivity.class);
                startActivity(anIntent);
                //drawerLayout.closeDrawers();
                break;
            case R.id.logout:
                Toast.makeText(getApplicationContext(), "Logout Clicked", Toast.LENGTH_LONG).show();
                break;
            case R.id.chat:
                Toast.makeText(getApplicationContext(), "CHat Clicked", Toast.LENGTH_LONG).show();
                break;
            case R.id.history:
                Toast.makeText(getApplicationContext(), "Hisotry Clicked", Toast.LENGTH_LONG).show();
                break;
            case R.id.db:
                Toast.makeText(getApplicationContext(), "Dashboard Clicked", Toast.LENGTH_LONG).show();
                break;
        }
        menuItem.setChecked(true);
        setTitle(menuItem.getTitle());
        mDrawarlayout.closeDrawers();
    }
    private void setupDrawerContent(NavigationView navigationView) {
        navigationView.setNavigationItemSelectedListener(new NavigationView.OnNavigationItemSelectedListener() {
            @Override
            public boolean onNavigationItemSelected(@NonNull MenuItem item) {
                selectItemDrawer(item);
                return true;
            }
        });
    }
}
This is the drawer activity xml
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/drawer_layout"
    tools:context=".DrawerActivity">
    <android.support.design.widget.NavigationView
        app:headerLayout="@layout/header"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:background="@color/white"
        app:itemTextColor="@color/primaryTextColor"
        app:menu= "@menu/drawermenu"
        android:id="@+id/navigationView"
        android:layout_gravity = "start">
    </android.support.design.widget.NavigationView>
</android.support.v4.widget.DrawerLayout>
This is how i have extended DrawerActivity
P.S this is what i followed Same Navigation Drawer in different Activities
public class MapActivity extends DrawerActivity{
........}
And i have noticed that the on item click listener works when i run the DrawerActivity only
