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

  • SEARCH
  • Home
  • 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 7022869
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T23:38:17+00:00 2026-05-27T23:38:17+00:00

I want fixed tabs at bottom such I can use the same tabs in

  • 0

I want fixed tabs at bottom such I can use the same tabs in each activity. I have a layout that shows the tabs at bottom but how can I add TextView above of that?

public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    TabHost tabHost = getTabHost();
    TabHost.TabSpec tabSpec;
    Intent intent;
    Resources resources = getResources();

    intent = new Intent(MainActivity.this, FirstActivity.class);
    tabSpec = tabHost.newTabSpec("tab1");
    tabSpec.setContent(intent);
    tabHost.addTab(tabSpec);

    intent = new Intent(MainActivity.this, SecondActivity.class);
    tabSpec = tabHost.newTabSpec("tab2");
    tabSpec.setContent(intent);
    tabHost.addTab(tabSpec);
}

This is my TabActivity. And I have ThirdActivity whose layout is like that(It does not seem but TextView is in RelativeLayout) :

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

TextView
    android:id="@+id/text"
    android:gravity="center_vertical"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />  

And I want ThirdActivity should contain the tabs “tab1” and “tab2”.

  • 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-05-27T23:38:17+00:00Added an answer on May 27, 2026 at 11:38 pm

    Use the tutorial in link above posted by Dipak, to create the layout of the TabHost.

    Then go ahead an create a class to handle the TabActivity and create 3 separate activity classes for each of your tabs. Link these with the layout described above.

    There is a tutorial here showing you how you can create a tab host.

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

Sidebar

Related Questions

I want to display a list of complex, but fixed-size multiline elements, assuming that
I have a somewhat complex query that I want to use as a source
I have a splitcontainer with horizontal orientation. I want a fixed height for panel2
I want to write a function in Python that returns different fixed values based
I want to remove digits from a float to have a fixed number of
I have my current location fixed via CoreLocation. Now I want to get those
I have a 16 bit fixed point processor and I want to do fixed
I want to create a layout that has small panels at the top and
I have a div that is using fixed positioning with a z-index of 100
I have table rows that move up and down, but my problem is that

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.