Why android data binding library is not working as expected?
<p>I am new to concept of Android Data Binding, i have read it from <a href="https://inthecheesefactory.com/blog/say-goodbye-to-findviewbyid-with-data-binding-library/en" rel="nofollow">this</a> blog and it is working properly with simple examples they had provided , I have taken a blank activity so there will be two files <code>activity_main.xml</code> and <code>content_main.xml</code> <br/><br/> 
This is <code>activity_main.xml</code> code <br/>
     
        </p>

<pre><code>        &lt;android.support.design.widget.CoordinatorLayout
            android:id="@+id/activity_main"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:fitsSystemWindows="true"
            tools:context=".activity.MainActivity"&gt;

            &lt;android.support.design.widget.AppBarLayout
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:theme="@style/AppTheme.AppBarOverlay"&gt;

                &lt;android.support.v7.widget.Toolbar
                    android:id="@+id/toolbar"
                    android:layout_width="match_parent"
                    android:layout_height="?attr/actionBarSize"
                    android:background="?attr/colorPrimary"
                    app:popupTheme="@style/AppTheme.PopupOverlay" /&gt;

            &lt;/android.support.design.widget.AppBarLayout&gt;

            &lt;include layout="@layout/content_main" /&gt;

            &lt;android.support.design.widget.FloatingActionButton
                android:id="@+id/fab"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="bottom|end"
                android:layout_margin="@dimen/fab_margin"
                android:src="@android:drawable/stat_notify_sync_noanim" /&gt;

        &lt;/android.support.design.widget.CoordinatorLayout&gt;
    &lt;/layout&gt;
</code></pre>

<p>As suggested i have taken parent as layout, and from java side i am accessing it as follows <br/></p>

<pre><code>public class MainActivity extends AppCompatActivity {

    ActivityMainBinding binding;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        binding = DataBindingUtil.setContentView(this, R.layout.activity_main);


         setSupportActionBar(activityMainBinding.toolbar);
        //Floating Action Button
         activityMainBinding.fab.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                Snackbar.make(view, "Replace with your own action", Snackbar.LENGTH_LONG)
                        .setAction("Action", null).show();
            }
        });

    }

}
</code></pre>

<p>This is ok and i can access all my views under <code>activity_main.xml</code> but for accessing contents inside <code>content_main.xml</code> i have done this in <code>MainActivity.java</code>  <br/></p>

<pre><code>ContentMainBinding contentMainBinding = DataBindingUtil.inflate(inflater,R.layout.content_main,clActivityMain,true);
 contentMainBinding.tvHello.setText("yippee"); &lt;br/&gt;
</code></pre>

<p>Problem is that it can not change the default text value provided from xml side in <code>content_main.xml</code> EX : <code>&lt;android:Text = "Hello World!"&gt;</code> <strong>and shows me both values(Provided in xml layout + Which i have set from java side)</strong>  I have already read it in <strong>Developer Documentation</strong> but its so much different then this blog i have read. Is there any proper way for this? As developer documentation or mentioned as in <a href="https://inthecheesefactory.com/blog/say-goodbye-to-findviewbyid-with-data-binding-library/en" rel="nofollow">this</a> Blog ?</p>