title: NavigationView how to handle dynamic header content
body: <p>I have a pretty standard NavigationView. When i use a static layout in the header like below it works perfect.</p>
  
  <pre><code>&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;
  </code></pre>
  
  <p>But i want to have a dynamic header so thah i can change it when user logged in etc... So i tried to use a fragment instead of nav_header.xml</p>
  
  <pre><code>&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/fragment_header"
      app:menu="@menu/drawer_view"/&gt;
  </code></pre>
  
  <p>Can i use a fragment in the headerLayout so i can handle all my logic in the fragment's java file. Or what is the right solution to handle this problem.</p>