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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:51:56+00:00 2026-06-06T09:51:56+00:00

Here is the problem: the text view border is smaller than the cell size

  • 0

Here is the problem: the text view border is smaller than the cell size in the column that contains “Looooooong Teeeeext”

enter image description here

I use this background drawable

<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
   <solid android:color="#ffffff" />
   <stroke android:width="1dip" android:color="#1e11d5"/>
</shape>

and This layout for the table

<LinearLayout android:id="@+id/ll_country"
        android:layout_height="fill_parent" android:layout_width="fill_parent">
        <ScrollView android:id="@+id/ScrollView11"
            android:layout_width="fill_parent" android:layout_height="fill_parent"
            android:fillViewport="true">
            <HorizontalScrollView
                android:layout_width="fill_parent" android:layout_height="fill_parent"
                 >
            <LinearLayout 
                android:id="@+id/layout_table"
                android:layout_width="fill_parent"
                android:layout_height="wrap_content" android:layout_margin="5dip">
                <!-- <TableLayout xmlns:android="http://schemas.android.com/apk/res/android"
                    android:layout_width="fill_parent" android:layout_height="fill_parent"
                    android:stretchColumns="0,1" android:id="@+id/country_table">
                </TableLayout> -->
            </LinearLayout>
            </HorizontalScrollView>
        </ScrollView>
    </LinearLayout>

this is the code that generates the table

for (int current = 0; current < 100 ; current++) {
            row = new TableRow(this);

            TextView t;
            for(int i =0 ; i < 20 ; i++){
                t = new TextView(this);
                t.setTextSize(20);
                t.setText(" text "+i+" ");
                t.setBackgroundDrawable(border);
                if((i== 4) && (current == 5)){
                    t.setText("  looooooong teeeeext  ");
                }
                //t.setWidth(20);
                t.setTextColor(Color.BLACK);
                row.addView(t,LinearLayout.LayoutParams.WRAP_CONTENT,LinearLayout.LayoutParams.WRAP_CONTENT);
                t.setBackgroundDrawable(border);
            }

            table.addView(row, new TableLayout.LayoutParams(
                    LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));

        }

layout_table.addView(table, new TableLayout.LayoutParams(
                LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT));
  • 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-06T09:51:58+00:00Added an answer on June 6, 2026 at 9:51 am

    Can you also show how you are generating the border drawable? I would suggest using

    t.setBackgroundResource(R.drawable.border)

    instead of

    t.setBackgroundDrawable(border)

    and see if this fixes the problem.

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

Sidebar

Related Questions

Here is my problem: in a variable that is text and contains commas, I
Here's the problem -- I have a few thousand small text snippets, anywhere from
So here is my problem, I'm trying to get the content of a text
So here's the problem. I have data in a MySQL DB as text. The
Can check out here alt text http://51hired.com/static/problem.bmp
date here my problem: String datetime = 2012-03-24 23:20:51; I know that that string
fairly new Android developer here. I've come across a strange problem that I'm not
I'm having a problem with the WPF Tab View control that I was hoping
I'm trying to diagnose a problem in UKSyntaxColoredTextDocument 0.4 http://www.zathras.de/angelweb/blog-uksctd-oh-four.htm where text that actually
I found this code from here: http://www.cssportal.com/form-elements/text-box.htm But the problem is you can still

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.