title: TextView from NavigationView header returning null
body: <p>I am using NavigationView which has a header layout, that header layout contains a textview which I am trying to access in my Activity and it returns null.</p>
  
  <p>Tried spending a lot of time on it, no hope.</p>
  
  <p><strong>My Activity</strong></p>
  
  <pre><code>public class MainActivity extends AppCompatActivity {
  
      private DrawerLayout mDrawerLayout;
      RelativeLayout headerLL;
      ImageView userIV;
      TextView usernameTV;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          headerLL = (RelativeLayout) findViewById(R.id.navHeaderLL);
          userIV = (ImageView) findViewById(R.id.userDPIV);
          usernameTV = (TextView) findViewById(R.id.usernameTV);
          //getting error here
          usernameTV.setText("Ashiq");
  
  
  
          initializeDrawer();
  
      }
  }
  </code></pre>
  
  <p><strong>activity_mail.xml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;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:id="@+id/drawer_layout"
          android:layout_height="match_parent"
          android:layout_width="match_parent"
          android:fitsSystemWindows="true"
          tools:context=".MainActivity"&gt;
  
          &lt;include layout="@layout/include_list_viewpager"/&gt;
  
          &lt;android.support.design.widget.NavigationView
              android:id="@+id/nav_view"
              android:layout_height="match_parent"
              android:layout_width="wrap_content"
              android:layout_gravity="start"
              android:fitsSystemWindows="true"
              app:headerLayout="@layout/nav_header"
              app:menu="@menu/drawer_view"
              /&gt;
  
      &lt;/android.support.v4.widget.DrawerLayout&gt;
  </code></pre>
  
  <p><strong>nav_header.xml</strong></p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="utf-8"?&gt;
      &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
          android:layout_width="match_parent"
          android:layout_height="192dp"
          xmlns:tools="http://schemas.android.com/tools"
          android:background="?attr/colorPrimaryDark"
          android:padding="16dp"
          android:id="@+id/navHeaderLL"
          android:theme="@style/ThemeOverlay.AppCompat.Dark"&gt;
  
          &lt;ImageView
              android:layout_width="100dp"
              android:layout_height="100dp"
              android:id="@+id/userDPIV"
              android:elevation="4dp"
              android:layout_above="@+id/usernameTV"
              android:layout_marginBottom="10dp"
              tools:src="@drawable/ic_menu"
              /&gt;
  
          &lt;TextView
              android:id="@+id/usernameTV"
              android:layout_width="match_parent"
              android:layout_height="wrap_content"
              style="@style/TextViewAppearance.UserName"
              tools:text="Username"
          android:layout_alignParentBottom="true"
          android:textAppearance="@style/TextAppearance.AppCompat.Body1"/&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>