Programatically determining whether device is a Phone or Tablet
<p>I've got an application with an activity containing 2 layouts:</p>

<ul>
<li>layout/activity_main.xml - "phone mode", with a single view inside (a list)</li>
<li>layout-w900dp/activity_main.xml - "tablet mode" with 2 views (list and details)</li>
</ul>

<p>Normally, I check the detail side of functionality with:</p>

<pre><code>if (findViewById(R.id.application_detail_container) != null) {
    // The detail container view will be present only in the
    // large-screen layouts (res/values-w900dp).
    // If this view is present, then the
    // activity should be in two-pane mode.
    mTwoPane = true;
}
</code></pre>

<p>How can I convert such approach to use data binding?</p>