adding style dinamically to a TextView

by nou » Wed, 21 Apr 2010 06:54:27 GMT

Sponsored Links

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)

      String[] ps = article.getATxt().split(Pattern.quote("\n"));

      for (String p : ps) {
         TextView newPar = new TextView(this);
         newPar.setPadding(0, 0, 0, 6);

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.



adding style dinamically to a TextView

by patbenatar » Wed, 21 Apr 2010 09:44:45 GMT

 This might help you:

Sponsored Links

Other Threads

1. Need electric vehicle integration system developer

Hi all,

I am an Industrial Design student working on an electric vehicle
project at my school. I had a wish; to develop a system that
integrates into the workings of the EV we are making using the Android
platform. A way to sync the phone with the vehicle, to be the nav
system, answer calls, run the stereo, unlock the doors, start the
vehicle, manage the battery, record vehicle stats, and what ever else
you can think of. As you may have guessed I know nothing about how to
do this, so I was hoping someone out there would find this an
interesting challenge and be willing to collaborate. Thanks for taking
the time to read this. I'm open to any suggestions (even if it is a
different place to ask this)



2. How switch or bring an activities to top?

let say i start an activities A then follow by activities B. So B sure
is at front or on top of A. Now can i bring A to run at front or on
top of B? Any one have any idea?


3. ThreadSafe HTTP Connection

4. Compile error v.1

5. Intent's Extra transfer

6. UUID.randomUUID().toString() always give the same uuid?

7. Does Android support Zigbee?