This might help you:

http://groups.google.com/group/android-developers/browse_thread/thread/a9ec3cbfe5bf7c27/7d92c1b26d9d5511

So because you say "format [padding]" I assume padding is the only
type of formatting you are doing here? If so, why do you need a style?
You can mess with the padding values in the setPadding method... Just
tinker with those integers until you have your padding the way you
want it....

-Nick




On Apr 20, 2:45 pm, nou <[email protected]> wrote:
> Hello
>
> I have a String[] and I need to create a "paragraph" for each of the
> strings in the array.
>
> basically what I am doing at the moment is this:
>
>       LinearLayout text = (LinearLayout)
> this.findViewById(R.id.itemText);
>
>       String[] ps = article.getATxt().split(Pattern.quote("\n"));
>
>       for (String p : ps) {
>          TextView newPar = new TextView(this);
>          newPar.setPadding(0, 0, 0, 6);
>          newPar.setText(p);
>          text.addView(newPar);
>       }
>
> I am not happy with the way I format (padding) each new textView beign
> created. I was wondering if there is a way to assign a style
> dinamically so that I can extract from the code the styling.
>
> 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 
> athttp://groups.google.com/group/android-developers?hl=en

-- 
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