title: How to data bind to a header?
body: <p>I have a main activity with a side navigation drawer in the action bar, specified as follows (note that a lot of code has been omitted for brevity) in default_screen.xml:</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="190dp"
      android:background="@drawable/honeycomb"
      android:orientation="vertical"
      &gt;
      &lt;android.support.design.widget.NavigationView
          android:id="@+id/navigation_view"
          android:layout_height="match_parent"
          android:layout_width="wrap_content"
          android:layout_gravity="start"
          app:headerLayout="@layout/header"
          app:menu="@menu/drawer"
          /&gt;
  </code></pre>
  
  <p>where layout/header is as follows (again, a bunch of lines omitted for brevity):</p>
  
  <pre><code>&lt;data&gt;
      &lt;variable name="user" type="oose2017.place2b.ClientUser"/&gt;
  &lt;/data&gt;
  &lt;TextView
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"
          android:text="@{user.displayName}"
          android:textSize="14sp"
          android:textColor="#FFF"
          android:textStyle="bold"
          android:gravity="left"
          android:paddingBottom="4dp"
          android:id="@+id/username"
          android:layout_above="@+id/email"
          android:layout_alignLeft="@+id/profile_image"
          android:layout_alignStart="@+id/profile_image" /&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>Where I instantiate my default_screen in the main activity as follows:</p>
  
  <pre><code>  setContentView(R.layout.default_screen);
  </code></pre>
  
  <p>How do I data bind to the header? I have tried a few things unsuccessfully, mainly:</p>
  
  <pre><code>DefaultScreenBinding binding = DataBindingUtil.setContentView(R.layout.default_screen);
  </code></pre>
  
  <p>Which does not work. How can I do this?</p>