Hi all,
I am having a problem.I want to explain in detail.
1)I am Having an TabActivity with 5 tabs. I loaded content as follows.
   class MainScreen extends TabActivity{
        public static TabHost mTabHost;
        public void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.tab);

           TabHost mTabHost = getTabHost();

            mTabHost.addTab(mTabHost.newTabSpec("excercise")
                                
.setIndicator("excercise",getResources().getDrawable
(R.drawable.exr))
                                .setContent(new Intent(this,Excercise.class)));
            mTabHost.addTab(mTabHost.newTabSpec("graphs")
                                
.setIndicator("graphs",getResources().getDrawable
(R.drawable.graph))
                                .setContent(new Intent(this,Graphs.class)));
            mTabHost.addTab(mTabHost.newTabSpec("gymlocator")
                                .setIndicator("gym 
locator",getResources().getDrawable
(R.drawable.gym))
                                .setContent(new Intent(this,Gymlocator.class)));
            mTabHost.addTab(mTabHost.newTabSpec("my account")
                                .setIndicator("my 
account",getResources().getDrawable
(R.drawable.my))
                                .setContent(new Intent(this,Myaccount.class)));
            mTabHost.addTab(mTabHost.newTabSpec("Music")
                                .setIndicator("Music",getResources().getDrawable
(R.drawable.music))
                                .setContent(new Intent(this,Music.class)));

            mTabHost.setCurrentTab(0);
        }
tab.xml
------------
<?xml version="1.0" encoding="utf-8"?>
<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">
    <LinearLayout
        android:orientation="vertical" android:background="@drawable/
innerbg"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs" android:paddingTop="55px"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content" />
        <FrameLayout
            android:id="@android:id/tabcontent"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">

        </FrameLayout>
    </LinearLayout>
</TabHost>

------------------------
And the Problem is If i want to start activity which is not specified
in tabhost in above Java code,it is going out of tabactivity.
ie.,It is not coming in tabactivity.

2)But i want to have all the activities under tabActivity.
   Please i nee dthe solution urgent.
  If any one knows please tell me .

I hope you i am clear with my problem.

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to