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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T03:17:54+00:00 2026-06-08T03:17:54+00:00

I came up with this very annoying layout issue. Basically the UI component I’m

  • 0

I came up with this very annoying layout issue.

Basically the UI component I’m looking for is not that complex, but the behavior needs to be exact.

In all cases I have 2 or 3 texts I need to layout horizontally.

In best case scenario all of these 3 fit in one line, so layout is not a problem.

| text 1 < empty space> | text 2 | < empty space> text 3 |

But when I hit an issue that text1 needs more than 1 lines, I should set that column 0 stretchable for TableLayout at the same time text2 might also need more than 1 lines so that column also needs to be stretchable and I would need the result to be like this:

| text1 many lines taking 40% | text2 takes 20% | text 3 many lines takes 40% |

And when this issue comes I haven’t found a way to set TableLayout shrink and stretch columns. And also problem is that TableRow can contain 2 or 3 children.

I did few hour testing playing with LinearLayout and onGlobalLayout I calculated how much which is taking and adjusted weights of those views, but that’s very complex and not working always, width on view3 sometimes just returned zero when view1 was very long.

I’m looking for some tips where to start here, should I do layouts in xml and inflate them instead programmically making them etc.

  • 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-08T03:17:56+00:00Added an answer on June 8, 2026 at 3:17 am

    Okay I found out the solution, column 0 shrinkable, column 1 stretchable and tablerow span 2 for tablerow child number 2 if only 2 childs.

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

Sidebar

Related Questions

I recently came across this blog post which basically says that we should not
Working on a NodeJS project, I came a across this very unexpected behaviour that
Evening, I came across this very useful post and I have everything looking good
I came across this line in a MySQL script `other_validator` varchar(5000) NOT NULL DEFAULT
I came across this very odd situation, and i thought i would throw it
Just came across this article about NOSQL patterns (not mine). It's covers lots of
I came across this comparison chart that suggests that FMS costs about 4.5 grands
While writing some code i came across this issue: #include <iostream> class random {
I came across this question ADZEN is a very popular advertising firm in your
I came across this strange issue at work so I created a minimal app

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.