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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T12:56:59+00:00 2026-05-13T12:56:59+00:00

I have a hard time understanding the layout tutorial. I am not able to

  • 0

I have a hard time understanding the layout tutorial. I am not able to align columns on different rows. For example, what does 3dip mean in android:padding=”3dip”. The documentation says “Available units are: px (pixels), dp (density-independent pixels), sp (scaled pixels based on preferred font size), in (inches), mm (millimeters). “.

Specifically, I want to create a layout with top and bottom two rows, and the middle are lists. And I want the bottom row to stick to the bottom. e.g.,


title1 | title 2| title 3|

list 1

list 2

bottom 1 | bottom 2 |

My current xml looks very ugly (without the middle lists)

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

<TableRow>
    <TextView
         android:layout_width="wrap_content"
          android:gravity="center_horizontal"
        android:text="title 1"
         />
    <TextView
    android:layout_width="wrap_content"
     android:gravity="center_horizontal"
        android:text="title 2"

         />
        <TextView
         android:layout_width="wrap_content"
          android:gravity="center_horizontal"
        android:text="title 3"            
        />
</TableRow>
<View        android:layout_height="2dip"        
android:background="#FF909090" />
   <TableRow>
    <TextView
         android:layout_width="wrap_content"
          android:gravity="center_horizontal"
        android:text="bottom 1"
         />

        <TextView
         android:layout_width="wrap_content"
          android:gravity="center_horizontal"
        android:text="bottom 2"            
        />
</TableRow>

  • 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-13T12:56:59+00:00Added an answer on May 13, 2026 at 12:56 pm

    A TableLayout isn’t really what you need for this. A TableLayout gives you something like Excel, where you have rows and columns.

    Also, dip is the same as dp.

    Possible Solution:

    <?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="fill_parent"
        android:orientation="vertical">
    
        <LinearLayout
            android:layout_height="wrap_content"
            android:id="@+id/TopRow"
            android:layout_width="fill_parent"
            android:orientation="horizontal">
    
            <TextView
                android:text="@+id/TextView01"
                android:id="@+id/TextView01"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:layout_weight="1" />
            <TextView
                android:text="@+id/TextView01"
                android:id="@+id/TextView01"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:layout_weight="1" />
            <TextView
                android:text="@+id/TextView01"
                android:id="@+id/TextView01"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:layout_weight="1" />
    
        </LinearLayout>
        <LinearLayout
            android:id="@+id/Middle"
            android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:layout_weight="1"
            android:orientation="vertical">
    
            <ListView
                android:id="@+id/ListView01"
                android:layout_width="fill_parent"
                android:layout_weight="1"
                android:layout_height="fill_parent" />
            <ListView
                android:id="@+id/ListView02"
                android:layout_height="fill_parent"
                android:layout_width="fill_parent"
                android:layout_weight="1" />
    
        </LinearLayout>
        <LinearLayout
            android:layout_height="wrap_content"
            android:layout_width="fill_parent"
            android:orientation="horizontal"
            android:id="@+id/BottomRow">
    
            <TextView
                android:text="@+id/TextView01"
                android:id="@+id/TextView01"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:layout_weight="1" />
            <TextView
                android:text="@+id/TextView01"
                android:id="@+id/TextView01"
                android:layout_height="wrap_content"
                android:layout_width="fill_parent"
                android:layout_weight="1" />
    
        </LinearLayout>
    </LinearLayout>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

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.