Chris,

You probably need two things.

1/ make sure your text view is multiline, as opposed to singleLine, if
you want it to wrap to the next line.

2/ you will need to set the column for your  text view (the one that
you want to wrap) to "shrinkable".
have a look at

http://developer.android.com/intl/de/reference/android/widget/TableLayout.html

If you don't do this, Android will just make each column as wide as
its content. It doesn't know which columns are ok to shrink and which
need to stay full width. That's your job.



On Jul 27, 1:49 am, Chris Stewart <cstewart...@gmail.com> wrote:
> Has anyone run into this?  Could use any advice. :)
>
> Chris Stewart
> cstewart...@gmail.com
>
> On Sat, Jul 24, 2010 at 11:51 PM, Chris Stewart <cstewart...@gmail.com>wrote:
>
> > I'm adding TableRow objects to my view dynamically based upon how many
> > items are in a collection I've loaded.  Everything loads fine and works
> > nearly as expected.  The one issue I'm having is that the text does not wrap
> > if it's too long for the screen, but instead goes off the side.  Can anyone
> > take a peek and tell me what I'm missing?
>
> >             TableRow tr = new TableRow(this);
> >             tr.setId(100 + current);
> >             tr.setLayoutParams(new LayoutParams(
> >                     LayoutParams.FILL_PARENT,
> >                     LayoutParams.FILL_PARENT));
>
> >             TextView labelTV = new TextView(this);
> >             labelTV.setId(200 + current);
> >             labelTV.setText(rssItem.getTitle() + "\n" +
> > rssItem.getSubTitle() + "\n" + rssItem.getDescription());
> >             labelTV.setTextColor(Color.WHITE);
> >             tr.addView(labelTV);
>
> >             tl.addView(tr, new TableLayout.LayoutParams(
> >                     LayoutParams.FILL_PARENT,
> >                     LayoutParams.FILL_PARENT));
>
> > Chris Stewart
> > cstewart...@gmail.com
> >http://www.androidsdkforum.com

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to