how access activity view from other activity class
<p>my problem is when i change the text of a TextView Main.class it return nullPointerException.</p>

<p>here's my code: </p>

<p>main.xml</p>

<pre><code>&lt;TabHost ...&gt;
  &lt;RelativeLayout ...&gt;
    &lt;LinearLayout ...&gt;
      &lt;TabWidget .../&gt;
       &lt;FrameLayout ...&gt;
        &lt;ListView ../&gt;
       &lt;/FrameLayout&gt;
    &lt;/LinearLayout&gt;

    &lt;LinearLayout ...&gt;
      &lt;TextView android:id="@+id/status" ... /&gt;

    &lt;/LinearLayout&gt;

  &lt;/RelativeLayout&gt;
&lt;/TabHost&gt;
</code></pre>

<p>Main.class</p>

<pre><code>....
TabHost tabHost;
TabHost.TabSpec spec;
Intent intent;

public void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.main);

    //display implementation of TabHost
    ....
    //Contacts tab
    intent = new Intent().setClass(this, Contacts.class);
    spec = tabHost.newTabSpec("contacts").setIndicator("Contacts",   res.getDrawable(R.drawable.ic_tab_contacts)).setContent(intent);
    tabHost.addTab(spec);

}
</code></pre>

<p>Then class that will update the <strong><em>status TextView</em></strong> is this:</p>

<p>Contacts.class</p>

<pre><code>public class Contacts extends ListActivity{
    public void onCreate(Bundle savedInstanceState){
       super.onCreate(savedInstanceState);

       //gather info to display in ListView
       ....

       updateStatus("New Status");
    }

    private void updateStatus(String status){
       TextView labelView = (TextView) findViewById(R.id.status);
       labelView.setText(status);
    }

}


labelView.setText(status); Error occurs here....
</code></pre>

<p>Pls help me. I cant find any solution in the net.
I need to update the status....</p>

<p>heres my manifest:</p>

<pre><code>...
 &lt;application ...&gt;
   &lt;activity android:name=".Main" ... &gt;
     &lt;intent-filter&gt;
            &lt;action android:name="android.intent.action.MAIN" /&gt;
            &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
      &lt;/intent-filter&gt;
   &lt;/activity&gt;

   &lt;activity android:name=".Contacts"  android:label="@string/app_name"&gt;&lt;/activity&gt; 
    &lt;activity android:name=".OtherClass"  android:label="@string/app_name"&gt;&lt;/activity&gt; 
    &lt;activity android:name=".OtherClass2"  android:label="@string/app_name"&gt;&lt;/activity&gt;
 &lt;/application&gt;
...
</code></pre>

<p>In advance, thanks for any help.</p>
