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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T11:10:11+00:00 2026-05-29T11:10:11+00:00

I have a table row defined in XML file. It contains 3 `LinearLayout’ one

  • 0

I have a table row defined in XML file.
It contains 3 `LinearLayout’ one on top of the other:
I would like to get this look:

|-------------------------------|
|                               |
|              a                |
|                               |
|                               |
|-------------------------------|
|                               |
|              b                |
|-------------------------------|
|                               |
|              c                |
|-------------------------------|

The “problem” is that the LinearLayout “a” might expand and be at different heights while “b” and “c” are always in the same height.

I would to find the maximum height of the LinearLayout‘s and to enforce this height to be the height of all the other LinearLayout‘s too, so I will get this look for each row:

|-------------------------------|
|                               |
|              a                |
|                               |
|                               |
|-------------------------------|
|                               |
|              b                |
|                               |
|                               |
|-------------------------------|
|                               |
|              c                |
|                               |
|                               |
|-------------------------------|

I tried using android:layout_weight with no success…

Any ideas?

  • 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-29T11:10:11+00:00Added an answer on May 29, 2026 at 11:10 am

    I tried to implement this in one example.
    Here is what I did :

    <?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_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#ff0000"
            >
               <TextView 
                android:layout_width="30dip"
                android:layout_height="wrap_content"
                android:text="hjadsh haksj hasjk haksj hjkas hkjas hjkas hkjas "
                android:textColor="#000000"
                />
    
        </LinearLayout>
    
            <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#00ff00"
            ></LinearLayout>
    
            <LinearLayout
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:background="#0000ff"
            ></LinearLayout>
    
    </LinearLayout>
    

    I used the textview in the first layout to show that it works as what you need.
    You can also fixed the height of the layout b & c to make them of fixed height and vary layout a by setting layout_height:wrap_content

    You can now customized it according to your need.

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

Sidebar

Related Questions

I have table defined with FlexiGrid. Call to all variables is ok. One column
I have a table defined like this: Column: Version Message Type: varchar(20) varchar(100) ----------------------------------
I have a table in Oracle 10 that is defined like this: LOCATION HOUR
Please see the below code: I am have a table row defined using asp.net
I have a table according to below. The second row has defined three columns,
I need delete row 1 of a table in a function I have defined.
I have a table row, and within that, I have a td (whatever it
I have a table row with 4 columns on my ecommerce site and I
I have a table row that needs to be hidden when the anchor with
I have a table row that has the error message in it. <tr runat=server

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.