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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:07:53+00:00 2026-06-10T13:07:53+00:00

I am trying to build a program where users data is displayed in table

  • 0

I am trying to build a program where users data is displayed in table view while Home,About and Settings are to be displayed in TabLayout just below the table layout but TabLayout is not shown on screen while program runs. Here I have two class file one to display table layout whereas another to display TabLayout.Below is my main.xml file:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">

<TableLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="7dp">
<TextView  
android:id="@+id/item_title"
android:layout_width="fill_parent" 
android:layout_height="wrap_content" 
android:textAppearance="?android:attr/textAppearanceMedium"
android:padding="2dp"
android:textSize="10dp" />
<TableRow 
    android:id="@+id/tableRow1"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content" >
            <TextView android:text="" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:minWidth="40dp" android:background="@drawable/top_left" android:textColor="#ffffffff"/>
           <TextView android:text="Civil Bank " android:paddingLeft="5dp" android:textStyle="bold" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1"   android:minWidth="40dp" android:background="@drawable/top_middle" android:textColor="#ffffffff"/>
           <TextView android:text="Sunrise Bank" android:paddingLeft="5dp" android:textStyle="bold" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_weight="1" android:minWidth="40dp" android:background="@drawable/top_right"  android:textColor="#ffffffff"/>
</TableRow>
<TableRow
           android:id="@+id/tableRow2"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content" >
           <TextView android:text="Web user" android:paddingLeft="5dp" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_middle"  android:textColor="#ffffffff"/>
           <TextView android:text="0.00" android:paddingLeft="5dp" android:id="@+id/webuserTxtView" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_middle" android:textColor="#ffffffff"/> 
           <TextView  android:text="0.00" android:paddingLeft="5dp" android:id="@+id/S_webuserTxtView" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_middle" android:textColor="#ffffffff" />
       </TableRow>

       <TableRow
           android:id="@+id/tableRow3"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content" >
           <TextView android:text="Transfer" android:paddingLeft="5dp" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_middle" android:textColor="#ffffffff"/>
           <TextView android:text="0.00" android:paddingLeft="5dp" android:id="@+id/transferTxtView" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_middle" android:textColor="#ffffffff"/>
           <TextView android:text="0.00" android:paddingLeft="5dp" android:id="@+id/S_transferTxtView"  android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_middle" android:textColor="#ffffffff"/>
       </TableRow>

       <TableRow
           android:id="@+id/tableRow4"
           android:layout_width="fill_parent"
           android:layout_height="wrap_content" >
           <TextView android:text="Cash" android:paddingLeft="5dp" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_right" android:textColor="#ffffffff"/>
           <TextView android:text="0.00" android:paddingLeft="5dp" android:id="@+id/cashTxtView" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_middle" android:textColor="#ffffffff"/>
           <TextView android:text="0.00" android:paddingLeft="5dp" android:id="@+id/S_cashTxtView" android:layout_width="fill_parent" android:layout_weight="1"  android:layout_height="wrap_content" android:background="@drawable/bottom_left" android:textColor="#ffffffff"/>
       </TableRow>



<TabHost
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"/>
</LinearLayout>
</TabHost>
</TableLayout>
 </LinearLayout>
  • 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-10T13:07:55+00:00Added an answer on June 10, 2026 at 1:07 pm

    You have given the width and height of your tablelayout as fill-parent.So it would probably occupy the whole space of your linearlayout. Instead of fill-parent you have to use wrap-content. In tabhost you use the property android:layout_below="@+id/yourTableLayout".

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

Sidebar

Related Questions

I am trying to build a data processing program. Currently I use a double
i m trying to build an invoice program that holds data in an Access
When trying to build a simple test program that uses atomic operations, I get
I am trying to build a program using the command scons compiler = msvc.
I am trying to build a program that accepts an array of integers as
I am currently trying to build a program where I have a recursive function
I was trying to build a datepicker program on iPhone. However, the time showed
I'm trying to build a C++ program with borland C++ Builder V5.5. Everything works
I'm trying to build a small program that hosts vst effects and I would
I'm trying to build a simple program to price call options using the black

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.