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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T11:48:57+00:00 2026-06-06T11:48:57+00:00

i need help on how to make fixed textview size in table layout. say

  • 0

i need help on how to make fixed textview size in table layout.
say if the text on it exceeds its size, i want the text on it to go to next line, and other textviews’ height on the same row will get stretched as well.

i’m using layout_weight to determine the size of textview, but problems come when the text on it exceeds its size. the table layout will become all messed up.

i’m trying to use ‘dp’ to make the size fixed, but i’m afraid the size will not fit the size of larger screen.

can anyone help on this? thanks in advance.

i’m using a scrollview on other rows but header row.

edit : changed the description, what i want is the text will go to next line if the text is too long and other textviews on same row will get stretched as well.

  • 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-06T11:48:59+00:00Added an answer on June 6, 2026 at 11:48 am

    You can use android:stretchColumns property for table-layout. so it will stretch your column and then in the child views of the table-row you can set the weight so that you can make all column with same width.

    Here is a sample code.

     <TableLayout
    android:id="@+id/TableLayout01"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:stretchColumns="1" >
    
    <TableRow
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:gravity="center_vertical" >
    
        <TextView
            android:layout_width="0dip"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="Number of Years of Installation"
            android:textAppearance="?android:attr/textAppearanceMedium" />
    
        <EditText
            android:id="@+id/etNumberOfYearsOfInstallation"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:inputType="number" />
    </TableRow>
    

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

Sidebar

Related Questions

I need help on figuring how to make a link for my Product that
This is beyond my level and I need some help. In the htaccess make
need help/guide for sql select query, I have 2 table stock and stock_history, in
Wondering if anyone can help with this. I have a table with some fixed
I need to make a rather complex query, and I need help bad. Below
I need some help in building a flexible html layout. I've defined minimum and
I need a help with a table that I can't get right. It is
Need help, function getFamily() { FB.api('/me/family', function(response) { alert(JSON.stringify(response)); }); } With the above
Need help with a query that I wrote: I have three tables Company id
Need help getting Ember-Data working with Zend Rest. At first, I'm familiar with Zend

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.