title: Android navigationview with header set , onItemClick not working
body: <p>I'm developing an application (as my first one) and In this app I've declared my navigationView like this:</p>
  
  <pre><code>&lt;android.support.design.widget.NavigationView
       android:layout_width="wrap_content"
       android:layout_height="match_parent"
       android:id="@+id/navigation_drawer"
       android:layout_gravity="start"
       android:fitsSystemWindows="true"
       app:menu="@menu/drawer_menu"
       app:headerLayout="@layout/drawer_header"&gt;
  </code></pre>
  
  <p>In my mainactivity.java I have:</p>
  
  <pre><code>public class MainActivity extends AppCompatActivity implements
  NavigationView.OnNavigationItemSelectedListener{
  ...
  @Override
  public boolean onNavigationItemSelected(@NonNull MenuItem item) {
      Log.d("Navigation","Item selected : "+ item.getItemId());
      int id = item.getItemId();
      switch (id){
          case R.id.about:
              Toast.makeText(getApplicationContext(),"About Us 
     elected",Toast.LENGTH_SHORT).show();
              break;
          case R.id.help:
          Toast.makeText(getApplicationContext(),
  "Help",Toast.LENGTH_SHORT).show();
              break;
          case R.id.setting:
  
   Toast.makeText(getApplicationContext(),
   "Settings",Toast.LENGTH_SHORT).show();
              break;
          case R.id.EditProfile:{
              Intent intent= new Intent(this , EditProfile.class);
              startActivity(intent);
          }
          default:
              break;
      }
      DrawerLayout drawerLayout= (DrawerLayout) 
  findViewById(R.id.drawer_layout);
      drawerLayout.closeDrawer(GravityCompat.START);
      return false;
  }
  </code></pre>
  
  <p>And according to <a href="https://stackoverflow.com/a/24536187/4158832">this</a> I've extended <code>ActionBarDrawerToggle</code> and in it's <code>onDrawerOpened</code> function I've don</p>
  
  <pre><code>drawerView.bringToFront();
  drawerView.getParent().requestLayout();
  </code></pre>
  
  <p>But still when I click on navigation view Items onNavigationItemSelected function doesn't fire.</p>
  
  <p>Is it because of header view I have added??</p>
  
  <p>This method worked before I add header view to navigationView( I didn't test it just before adding header to navigationView.</p>
  
  <p>And also I think it's useful to note that I have some buttons and TextViews in navigationView header.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout 
      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:orientation="vertical"
      android:id="@+id/drawer_header"
      android:background="@drawable/drawer_bg"
      android:layout_width="match_parent"
      android:padding="4dp"
      android:layout_height="200dp"&gt;
  
  
      &lt;RelativeLayout
          android:gravity="center_vertical"
          android:orientation="horizontal"
          android:layout_width="match_parent"
          android:layout_marginTop="50dp"
          android:layout_gravity="center"
          android:layout_height="wrap_content"&gt;
  
          &lt;de.hdodenhof.circleimageview.CircleImageView
              xmlns:app="http://schemas.android.com/apk/res-auto"
              android:layout_width="80dp"
              android:layout_height="80dp"
              android:src="@drawable/avatar"
              android:id="@+id/AvatarImageView"
              android:layout_centerHorizontal="true" /&gt;
  
          &lt;Button
              android:text="Signup"
              android:layout_width="55dp"
              android:layout_height="55dp"
              android:layout_alignParentRight="true"
              android:id="@+id/header_signup"
              android:textSize="12sp"
              android:background="@drawable/signup_button"
              android:textStyle="normal|bold" /&gt;
  
  
      &lt;/RelativeLayout&gt;
  
      &lt;TextView
          android:textColor="@color/colorPrimaryDark"
          android:layout_width="match_parent"
          android:layout_centerHorizontal="true"
          android:layout_height="wrap_content"
          android:id="@+id/header_username"
          android:textAlignment="center" /&gt;
  
      &lt;TextView
          android:text="Logout"
          android:textColor="@color/colorPrimaryDark"
          android:layout_width="match_parent"
          android:layout_centerHorizontal="true"
          android:textAlignment="center"
          android:layout_height="wrap_content"
          android:id="@+id/header_logout"
          /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>