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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:50:00+00:00 2026-05-27T01:50:00+00:00

This problem is pretty simple, I think. The thing is: My TextView (Which is

  • 0

This problem is pretty simple, I think.

The thing is: My TextView (Which is in a TableRow which is in a TableLayout) gets out of the visible screen.

A screenshot should clarify:

yep

I tried

        tvValue.setLinksClickable(true);
        tvValue.setEllipsize(TruncateAt.MIDDLE);

1) No truncation is applied
2) Obviously, they show links, but they are not clickable!

As its a highly dynamic thing i need to do all initialization in code.
So, here’s the code:

public class StartUp extends Activity {

private TableLayout mTableLayout;

@Override
protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    final Context appContext = getApplicationContext();

    mTableLayout = new TableLayout(appContext);
    mTableLayout.setBackgroundColor(0xffffffff);

    String[] h = new String[] { "email", "facebook", "youtube" };
    String[] v = new String[] { "lol@xd.de", "http://www.facebook.com/010101010101010", "http://www.youtube.com/lalala" };

    LayoutParams rowLayoutParams = new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.WRAP_CONTENT);

    for (int i = 0; i < h.length; ++i) {
        TableRow row = new TableRow(appContext);
        row.setLayoutParams(rowLayoutParams);

        TextView tvHead = new TextView(appContext);
        tvHead.setTextColor(0xff336699);
        tvHead.setPadding(0, 0, 10, 0);
        tvHead.setText(h[i]);

        TextView tvValue = new TextView(appContext);
        tvValue.setTextColor(0xff191919);
        tvValue.setLinksClickable(true);
        tvValue.setText(v[i]);
        tvValue.setEllipsize(TruncateAt.MIDDLE);


        row.addView(tvHead);
        row.addView(tvValue);
        mTableLayout.addView(row);
    }

    setContentView(mTableLayout);

}

}

  • 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-27T01:50:01+00:00Added an answer on May 27, 2026 at 1:50 am

    Have you tried setColumnShrinkable()?
    http://developer.android.com/reference/android/widget/TableLayout.html#setColumnShrinkable%28int,%20boolean%29

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

Sidebar

Related Questions

I think this may be a pretty simple ActiveRecord problem to solve but if
I've already got this data, which was pretty simple: NSInteger numWeeks = ...; NSInteger
This should be a pretty simple thing to do with Update Panels, but I'm
Hey There, This is a pretty simple problem, but it is my first time
I'm having a problem with NSString. I feel like it's a pretty simple thing
I've got a pretty simple problem, I think. I'm using WPF in Visual Basic
Guys, I've came across this problem I can't resolve myselg, I'm pretty sure I
My problem is pretty straigtforward explained : if I do this : public class
This is pretty much the same problem i have, except with very different code:
My problem is perhaps pretty simple, but I just started programming in C#. My

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.