Need to to fix android tabs
<p>I am making tabs in android. Currently this is how my tabs are working. When I click on any tab it will take me to appropriate tab's view which is fine. But lets say when I click on <code>Profile</code> tab then inside this <code>profile</code> view there is a button <code>Add New</code>. When I click on <code>Add New</code> button then it takes me to it's view but <strong>it also removes tabs from the view which I don't want.</strong> So how can I make tabs always available even when user clicks any link or button inside any view?</p>

<p>Here is my current code</p>

<p>tabs.xml</p>

<pre><code>&lt;TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent"&gt;
&lt;RelativeLayout
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:padding="5dp"&gt;
    &lt;TabWidget
        android:id="@android:id/tabs"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true" /&gt;
    &lt;FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:padding="5dp" /&gt;
&lt;/RelativeLayout&gt;
&lt;/TabHost&gt;
</code></pre>

<p>Tabs.java</p>

<pre><code>public class Tabs extends TabActivity {
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.tabs);

    Resources resources = getResources(); 
    TabHost tabHost = getTabHost();

    Intent startUseSaldo = new Intent().setClass(this, Usesaldo.class);
    TabSpec useSaldo = tabHost
      .newTabSpec("UseSaldo")
      .setIndicator("Use Saldo")
      .setContent(startUseSaldo);

    Intent startHistory = new Intent().setClass(this, History.class);
    TabSpec history = tabHost
      .newTabSpec("History")
      .setIndicator("History")
      .setContent(startHistory);

    Intent startProfile = new Intent().setClass(this, Profile.class);
    TabSpec profile = tabHost
      .newTabSpec("Profile")
      .setIndicator("Profile")
      .setContent(startProfile);

    // add all tabs 
    tabHost.addTab(useSaldo);
    tabHost.addTab(history);
    tabHost.addTab(profile);

    tabHost.setCurrentTab(1);
}
}
</code></pre>

<p>Profile.java</p>

<pre><code>public class Profile extends Activity {
Button bAddNew;
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.profile);
    bAddNew = (Button)findViewById(R.id.bAddNew);

    bAddNew.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub
            Intent AddFacility = new Intent(getApplicationContext(), AddFacility.class);
            startActivity(AddFacility);
        }
    });
}
}
</code></pre>

<p>AddFacility.java</p>

<pre><code>public class AddFacility extends Activity {

@Override
public void setContentView(int layoutResID) {
    // TODO Auto-generated method stub
    super.setContentView(R.layout.add_facility);
}

}
</code></pre>
