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 4531078
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T13:52:08+00:00 2026-05-21T13:52:08+00:00

I am working on a new module of Email application in android. My main.xml

  • 0

I am working on a new module of Email application in android.

My main.xml file:

<?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:layout_width="fill_parent"
        android:layout_height="fill_parent">
        <TabWidget
            android:id="@android:id/tabs"
            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">
            <TextView 
                android:id="@+id/textview1"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" 
                android:text="" />
            <TextView 
                android:id="@+id/textview2"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" 
                android:text="" />
            <TextView 
                android:id="@+id/textview3"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" 
                android:text="" />
                 <TextView 
                android:id="@+id/textview4"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" 
                android:text="" />
                 <TextView 
                android:id="@+id/textview5"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent" 
                android:text="" />
        </FrameLayout>
    </LinearLayout>
</TabHost>

Its working fine.
My query is:
I have 5 tabs(Compose mail,Inbox,Sentmail,Drafts and Contacts). On clicking the respective tab I need to display corresponding application.
Eg. Wen i click on Compose mail tab, I need to compose mail application to get displayed and wen i click Inbox tab i need to display Inbox mails and so on.

Can some body help me in this issue?

Pls refer me any links for complete mailbox application source code.

Thanks in advace.

  • 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-21T13:52:09+00:00Added an answer on May 21, 2026 at 1:52 pm

    The Hello, TabWidget tutorial over on the Android developer site will explain what you need to do regarding your tabs.

    You’ll need an Activity for each tab, and you’ll set up your tab host to switch between them like so (in your TabActivity):

    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    
       Resources res = getResources(); // Resource object to get Drawables
       TabHost tabHost = getTabHost();  // The activity TabHost
       TabHost.TabSpec spec;  // Resusable TabSpec for each tab
       Intent intent;  // Reusable Intent for each tab
    
       // Create an Intent to launch an Activity for the tab (to be reused)
       intent = new Intent().setClass(this, InboxActivity.class);
    
       // Initialize a TabSpec for each tab and add it to the TabHost
       spec = tabHost.newTabSpec("inbox").setIndicator("Inbox",
                         res.getDrawable(R.drawable.ic_tab_inbox))
                     .setContent(intent);
       tabHost.addTab(spec);
    
       ...
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a new project, a web application, where I need to focus
I am working on a new payment module for Magento and have come across
I am working in a new Filter by Product module in Magento, i have
We are working on a new application that uses C#, WPF4, Prism4 and MEF.
I am new to DNN and working with custom module in DNN, I have
I am new to moodle ,currently i am working on questionnaire module, in which
I'm working on a new module for TomatoCMS. Here you'll be able to post
I am working on a new module of existing live project. It is a
I am working on implementing a new payment module for Magento and want to
I am currently working on administrator module as m new to asp.net i am

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.