Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8280797
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:48:35+00:00 2026-06-08T09:48:35+00:00

Firstly!, I’ve used the generated Activity using the tab navigation type. I just used

  • 0

Firstly!,
I’ve used the generated Activity using the tab navigation type. I just used it to automatically generate Tab control on the Activity. Its on the latest ADT.I think :(,,
Now my question is how do I use the Fragments from other Activity in to the Tab contents

secondly,
Is there any other way to put another Activity inside the Tab content which on the, lets say its MainACtivity.class?….

Planning to have 3 Tabs with 3 different Activitys, each of which contains 1 Activity per tab content

Really need ur help guys I have run out of ideas and sources 🙁 🙁 …
Kind of new to android development so be gentle. 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T09:48:37+00:00Added an answer on June 8, 2026 at 9:48 am

    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">
    
        <RelativeLayout
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical"
             >
    
            <TabWidget
                android:id="@android:id/tabs"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" 
                android:layout_marginTop="60dp"/>
           <FrameLayout
                android:id="@android:id/tabcontent"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent"
                android:padding="5dp"/>
        </RelativeLayout>
    
    </TabHost>
    

    Add below code in your activity.java file:

    extend your activity by android.app.TabActivity instead of Activity

    TabHost tabHost=getTabHost();
        TabHost.TabSpec spec;
        Intent intent;
    
        intent=new Intent().setClass(YourActivity.this, NewActivity.class);
        spec=tabHost.newTabSpec("tab1").setIndicator("imageId").setContent(intent);
        tabHost.addTab(spec);
    
        intent=new Intent().setClass(YourActivity.this, New1Activity.class);
        spec=tabHost.newTabSpec("tab2").setIndicator("imageId").setContent(intent);
        tabHost.addTab(spec);
    
        tabHost.setCurrentTab(0);
    

    In the same way you can add as many tabs in your activity.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Firstly I am using this for the ListView control itself: ItemsSource={Binding AllEffects} So would
Firstly, I know this [type of] question is frequently asked, so let me preface
Firstly, this is going to sound like homework, but it ain't. Just a problem
Firstly, I'm not using rails. This is vanilla ruby application. I've read about packaging
Firstly I design the site & convert it into HTML using Twitter bootstrap. The
Firstly, I just want to say that the gmaps4rails gem has been fantastic. Easy
Firstly, wikipedia defines a Control Panel Applet as: graphical user interface which allows users
Firstly, sorry for my flawed english and being dumb :O I just want to
Firstly, let me just say that I'm very new to JSR-170 and Jackrabbit/Lucene in
firstly i just clearify the problem. i am testing the page of login of

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.