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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T11:20:47+00:00 2026-06-07T11:20:47+00:00

I am displaying one table layout, in that I want separation line between rows

  • 0

I am displaying one table layout, in that I want separation line between rows in the table.Also is it possible to have column wise separation in table layout.Please help me.

Following is my xml table layout:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingBottom="6dip"
    android:paddingTop="4dip">

    <TableLayout
        android:id="@+id/tablelayout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:paddingRight="2dip">

        <TableRow>

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Income"></TextView>

            <TextView
                android:layout_width="150px"
                android:layout_height="wrap_content"
                android:layout_marginLeft="150dp"
                android:text="Expense"></TextView>
        </TableRow>

        <TableRow android:layout_marginTop="30px">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:text="Household:"></TextView>

            <TextView
                android:id="@+id/text50"
                android:layout_width="150px"
                android:layout_height="wrap_content"
                android:text="Household:"></TextView>
        </TableRow>


        <TableRow android:layout_marginTop="40px">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_span="2"
                android:text="Travel:"></TextView>

            <TextView
                android:id="@+id/text51"
                android:layout_width="150px"
                android:layout_height="wrap_content"
                android:layout_marginLeft="-250dp"
                android:text="Travel"></TextView>
        </TableRow>

        <TableRow android:layout_marginTop="40px">

            <TextView
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_span="2"
                android:text="Education:"></TextView>

            <TextView
                android:id="@+id/text52"
                android:layout_width="150px"
                android:layout_height="wrap_content"
                android:layout_marginLeft="-250dp"
                android:text="Education"></TextView>
        </TableRow>

    </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-07T11:20:49+00:00Added an answer on June 7, 2026 at 11:20 am

    Check this. It will work.

    <?xml version="1.0" encoding="utf-8"?>
    <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/white"
        android:orientation="vertical"
        android:paddingBottom="6dip"
        android:paddingTop="4dip" >
    
        <TableLayout
            android:id="@+id/tablelayout"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:paddingRight="2dip" >
    
            <TableRow>
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Income" >
                </TextView>
    
                <TextView
                    android:layout_width="150px"
                    android:layout_height="wrap_content"
                    android:layout_marginLeft="150dp"
                    android:text="Expense" >
                </TextView>
            </TableRow>
    
            <TableRow
                android:layout_width="match_parent"
                android:layout_height="wrap_content" >
    
                <View
                    android:id="@+id/line1"
                    android:layout_width="match_parent"
                    android:layout_height="1dip"
                    android:layout_weight="1"
                    android:background="#FF909090"
                    android:padding="2dip" />
            </TableRow>
    
            <TableRow android:layout_marginTop="30px" >
    
                <TextView
                    android:layout_width="wrap_content"
                    android:layout_height="wrap_content"
                    android:text="Household:" >
                </TextView>
    
                <TextView
                    android:id="@+id/text50"
                    android:layout_width="150px"
                    android:layout_height="wrap_content"
                    android:text="Household:" >
                </TextView>
            </TableRow>
           </TableLayout>
    
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have few Vaadin tabs one of them is displaying an table and some
I have one table with gender as one of the columns. In gender column
I have some JavaScript that cycles through n div tags, displaying only one at
I have a CATEGORIES table that links to an ITEMS table (one to many).
I have a list of names that I'm displaying in one cell of a
I have built some highcharts charts and I am displaying them one at a
I have one Page which is displaying details of some Client. I am using
I have one query. Through while loop I am displaying three random songs from
I have two images - 1)a rectangular one, displaying the actual content and 2)a
I have two plots displaying supply and demand, and one plot in which I

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.