title: how to assign a value to a text view in another layout on android
body: <p>i have two layouts a bus and a taxi layout and another header layout.the header layout is displayed on both the taxi and the bus layout.the header layout has a text view and i wanted to set the value of the header text view from the class of the two layouts.i wanted to show the number of buses or taxis on the header 
  this is the code for the bus layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;include layout="@layout/header" /&gt;
  
      &lt;LinearLayout 
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>this is the code for the taxi layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:orientation="vertical" &gt;
  
      &lt;include layout="@layout/header" /&gt;
  
      &lt;LinearLayout 
          android:layout_width="match_parent"
          android:layout_height="match_parent"&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>now based on which layout is displayed i wanted to set the value of the text view on the header layout form the class using java code.<br>
  this is the header layout</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/header"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:layout_alignParentTop="true"
      android:background="#000"
      android:gravity="right" &gt;
  
      &lt;TextView
          android:id="@+id/HeaderText"
          android:layout_width="wrap_content"
          android:layout_height="40dp"
          android:layout_margin="5dp"
          android:textColor="#000"
          android:text="     "
          android:background="#fffff0"
          android:textSize="30dp" /&gt;
  &lt;/RelativeLayout&gt; 
  </code></pre>
  
  <p>please help</p>