How to set the background color of new activity after clicking tabs
<p>I am switching activities on tab clicks and successful at this. But, in one of my Activity class I am doing the following:
`
 public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.main);</p>

<p>}<code>
main.xml has the following:</code>

<pre><code>android:layout_width="fill_parent"
android:layout_height="fill_parent"
    android:background="#BDBDBD"
&gt;
</code></pre>

<p><code>
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"` I cannot see any change taking and tabs are still their.</p>

<p>Please help. </p>

<hr>

<p>Here is some information..
screen2.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
</code></pre>

<p></p>

<p></p>

<p>

</p>

<p>





</p>

<p>
</p>

<p>screen1.xml
    
</p>

<pre><code>        &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>}</p>

<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>
