title: How to set the background color of new activity after clicking tabs
body: <p>I am switching activities on tab clicks and successful at this. But, in one of my Activity class I am doing the following:</p>
  
  <pre><code>public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      setContentView(R.layout.main);
  }
  </code></pre>
  
  <p>main.xml has the following:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
  
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
          android:background="#BDBDBD"&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>I want to change the background of this layout only and I want tabs to their as it is. But with the current  <code>android:layout_height="fill_parent"</code> in main.xml my background is overwriting the tabs which means I am unable to see tabs. and If I make <code>android:layout_height="wrap_content"</code> I cannot see any change taking and tabs are still their.</p>
  
  <p>Please help. </p>
  
  <hr>
  
  <p>Here is some information..<br>
  screen2.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/ScrollView01" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"&gt;
  
      &lt;LinearLayout 
          android:id="@+id/LinearLayout01" 
          android:layout_width="fill_parent" 
          android:layout_height="fill_parent"
          android:orientation="vertical"&gt;
  
          &lt;LinearLayout android:id="@+id/LinearLayout02" 
              android:layout_width="fill_parent" 
              android:layout_height="wrap_content"
              android:gravity="center"&gt;
              &lt;TextView android:text="AcctId" 
                  android:id="@+id/TextView01" 
                  android:layout_width="50px" 
                  android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
              &lt;EditText 
                  android:id="@+id/acctid" 
                  android:layout_width="200px" 
                  android:layout_height="wrap_content"&gt;&lt;/EditText&gt;
  
          &lt;/LinearLayout&gt;
          &lt;LinearLayout android:id="@+id/LinearLayout03" 
              android:layout_width="fill_parent" 
              android:gravity="center"
              android:layout_height="wrap_content"&gt;
              &lt;TextView android:text="Zip" 
                  android:id="@+id/TextView02" 
                  android:layout_width="50px" 
                  android:layout_height="wrap_content"&gt;
              &lt;/TextView&gt;
              &lt;EditText 
                  android:id="@+id/stid" 
                  android:layout_width="200px" 
                  android:layout_height="wrap_content"&gt;
              &lt;/EditText&gt;
          &lt;/LinearLayout&gt;
          &lt;Button android:text="Login"
              android:layout_width="80px"
              android:layout_height="wrap_content"
              android:layout_gravity="center"&gt;
          &lt;/Button&gt;
          &lt;ImageView 
              android:layout_width="200px"
              android:layout_height="200px"
              android:src="@drawable/icon"
              android:layout_gravity="center"&gt;
          &lt;/ImageView&gt;
      &lt;/LinearLayout&gt;
  &lt;/ScrollView&gt;
  </code></pre>
  
  <p>screen1.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &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;FrameLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:background="#c6c3c6"
          android:layout_gravity="bottom"
          android:paddingTop="1dip"
          android:paddingLeft="1dip"
          android:paddingRight="1dip"&gt;
  
      &lt;TabWidget
          android:layout_gravity="bottom"
          android:id="@android:id/tabs"
          android:layout_height="wrap_content"
          android:layout_width="fill_parent"/&gt;
      &lt;/FrameLayout&gt;
      &lt;FrameLayout
          android:id="@android:id/tabcontent"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent" &gt;
  
      &lt;/FrameLayout&gt;
  &lt;/TabHost&gt;  
  </code></pre>
  
  <p>MainActivity.java</p>
  
  <pre><code>public class onstarAndroidMain extends TabActivity {
  
      public void onCreate(Bundle savedInstanceState){
      super.onCreate(savedInstanceState);
      setContentView(R.layout.screen1);
      addTabs();
      }
  
      private void addTabs(){
      Resources resources = getResources();
  
      TabHost tabs = (TabHost) findViewById(android.R.id.tabhost);
      tabs.setup();
  
      //tabspec defines the attributes of the tab
      TabSpec tab;
  
  
      tab = tabs.newTabSpec("Screen1");
      tab.setContent(new Intent(this, Screen1.class));
      tab.setIndicator("Screen1");
      tabs.addTab(tab);
      tabs.getTabWidget().getChildAt(0).getLayoutParams().height = 30;
  
      tab = tabs.newTabSpec("Screen2");
      tab.setContent(new Intent(this, Screen2.class));
      tab.setIndicator("Screen2");
      tabs.addTab(tab);
      tabs.getTabWidget().getChildAt(1).getLayoutParams().height = 30;
  
      tab = tabs.newTabSpec("Screen3");
      tab.setContent(new Intent(this, Screen3.class));
      tab.setIndicator("Screen3");
      tabs.addTab(tab);
      tabs.getTabWidget().getChildAt(2).getLayoutParams().height = 30;
  
      //sets the current tab
      tabs.setCurrentTab(0);
      //add the tabhost to the main content view
  
      }
  }
  </code></pre>
  
  <p>Screen2.java</p>
  
  <pre><code>public class OnstarScreen2 extends Activity {
  
  @Override
  public void onCreate(Bundle icicle) {
      super.onCreate(icicle);
      setContentView(R.layout.screen2);
  }
  </code></pre>
  
  <p>Now whenever I click the screen2 tab and try to get the screen2.xml, my tabs are going below the screen2 layout. I dont know what to do. Basically what I want to achieve is that the tab should be always their at the bottom irrespective of what view is shown above them. they should not be overlapped with anything else. </p>
  
  <p>screen2.xml has a scrollview and iside that I have a linearlayout which has a login form...but this form whenever is called just comes above the tabs...please help</p>