I've got an application with an activity containing 2 layouts:
- layout/activity_main.xml - "phone mode", with a single view inside (a list)
- layout-w900dp/activity_main.xml - "tablet mode" with 2 views (list and details)
Normally, I check the detail side of functionality with:
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;
}
How can I convert such approach to use data binding?