I need some help with the following scenario, as I am so used to make
all of my layouts with XML, but now I have a situation where that
won't work.

I am working on the second version of my app that delivers news, in
the comments section I used to use a listview to display user
comments, but it doesn't work that great for comments that could be
anywhere from 5  to 500+ characters long. So I want to create a whole
bunch of TextViews in a scrollview and stack them below each other.

My best guess was this, although it is definitely wrong because it
only shows one comment. I assume I have to use some kind of
LayoutParams and so I've looked into it but am still not sure how
exactly to use them. Can anyone suggest a way to do what I want?
____________________________________
for (String comment : comments_list) {

                        TextView txt_comment = new TextView(this);
                        txt_comment.setText(comment.toString());
                        txt_comment.setTextColor(R.color.solid_black);

                        comment_layout.addView(txt_comment);
}

____________________________________

Thanks.

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

Reply via email to