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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T04:00:57+00:00 2026-05-21T04:00:57+00:00

I followed this example and got it worked. Now I want to show a

  • 0

I followed this example and got it worked.

Now I want to show a ‘Welcome!!!’ text just above the tabs in a Tabhost layout just like one show in figure

enter image description here

Here is my current layout file. But it does not show the Welcome message.

<?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:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:gravity="top"
            android:layout_gravity="top"
            android:padding="5dp">
            <TextView xmlns:android="http://schemas.android.com/apk/res/android"
                android:id="@+id/cc_welcome" android:layout_width="fill_parent"
                android:layout_height="wrap_content" android:text="Welcome"
                android:gravity="top" android:padding="50dp" android:textColor="#ffffff"/>
        </LinearLayout>
    <LinearLayout
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:gravity="bottom"
        android:layout_gravity="bottom"
        android:paddingTop="50dp">
        <TabWidget
            android:id="@android:id/tabs"
            android:layout_alignParentTop="true"
            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"
            android:padding="5dp" />
        </LinearLayout>

</TabHost>
  • 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-21T04:00:58+00:00Added an answer on May 21, 2026 at 4:00 am

    I have edited the xml file. Have a try with this :

    Updated:

    <?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 xmlns:android="http://schemas.android.com/apk/res/android"
            android:orientation="vertical" 
            android:layout_width="fill_parent"
            android:layout_height="fill_parent">
            <RelativeLayout
                android:id="@+id/welcome"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content">
                <TextView xmlns:android="http://schemas.android.com/apk/res/android"
                    android:id="@+id/cc_welcome" 
                    android:layout_width="fill_parent"
                    android:layout_height="wrap_content" 
                    android:text="Welcome"
                    android:layout_centerInParent="true"
                    android:textColor="#ffffff"/>
            </RelativeLayout>
            <RelativeLayout
                android:layout_below="@id/welcome"
                android:orientation="vertical"
                android:layout_width="fill_parent"
                android:layout_height="fill_parent">
                <TabWidget
                    android:id="@android:id/tabs"
                    android:layout_alignParentTop="true"
                    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"
                    android:layout_below="@android:id/tabs"/>
            </RelativeLayout>
        </RelativeLayout>
    </TabHost>
    

    I have updated the code. Can you please try now.

    You will get a better idea about the Linear and Relative layout here

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

Sidebar

Related Questions

I've got this to work using a very basic example(outlined below) and I want
I've followed this gist , this blog post and downloaded and deployed this example
I followed the Android Hello world example the other day, and got it to
http://www.devx.com/wireless/Article/39101/0/page/2 I have followed this tutorial and got it to work and everything. now
Followed this question about delayed_job and monit Its working on my development machine. But
I followed this post step by step but when I'm running it and enter
I followed this tutorial on configuring the Rails plugin ExceptionNotifier. I know that I
I followed this tutorial: https://github.com/EllisLab/CodeIgniter/wiki/PDF-generation-using-dompdf However, I can't seem to set the path right.
I followed this way. To create a workspace to manage your source-controlled files 1.
I followed this guide here perfectly and have gone through it again but when

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.