A: 

You are doing something wrong with your tabs. Are you just launching a new activity when the tab is clicked? Then, if that new activitys layout covers the entire screen, ofcourse the tabs will be covered by this.

Follow this guide: http://developer.android.com/intl/de/resources/tutorials/views/hello-tabwidget.html

sandis
Now If I waned to launch a webview with one of my tabs and I want the tab content to be still visible then what should I do..coz without specifying the layout_height and weight as fill_parent I cannot get the webview working ..I am kind of confused..
androidProgrammer
follow the link i posted? ._. i cant help you from the limited information you have given
sandis
Help folks......................
androidProgrammer
A: 

Here is some information.. screen2.xml

<?xml version="1.0" encoding="utf-8"?>

screen1.xml

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

    <TabWidget
    android:layout_gravity="bottom"
        android:id="@android:id/tabs"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent"/>
    </FrameLayout>
    <FrameLayout
        android:id="@android:id/tabcontent"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

                    </FrameLayout>
            </TabHost>  

MainActivity.java

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

}

}

Screen2.java

public class OnstarScreen2 extends Activity {


@Override
public void onCreate(Bundle icicle) {
    super.onCreate(icicle);
   setContentView(R.layout.screen2);
       }

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.

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

androidProgrammer
your post should have been edited in on your original question instead of placed as an answer. Also, it appears as if part of screen1.xml is missing. Your problem might be in screen1.xml, since it is a complete mess. Just copy-paste from the guide I posted and your problems might go away. Redo everything from scratch if you have to.
sandis
I got it to work actually....sandis thanks though...because whenever I created a new layout and called it through the intent the layout filled completely on my tabs. so the rule is to create the content inside the tabcontent if you wish to use views or completely use intent and launch new activity. Am I right.
androidProgrammer