adding style dinamically to a TextView

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


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

--



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. source code of libcamera, liboemcamera and libaudio

all the native hardware libraries are present in below folder
./hardware/libhardware/..
./hardware/ti/omap3/..
./hardware/qcom/...



> website: 

2. Cm507 test2

Done flash
Tampilan bot awal seperti eclair animasi 3D byar byar hehehe nama nya apa ya

Icon yg biasa nya 3G jadi logo H

Yg lain blum coba hehehehe


Ichan nih. 
sent by jave aka jupe

-- 
"Indonesian Android Community [id-android]" 

3. Retrieving a Layout/View programmatically problem

4. OOT: Undangan 鈥淕rand Launchin g 42 Mbps鈥?Indosat

5. Question about reading contacts

6. Text Entry Sequence with the Soft Keyboard

7. Mohon Bantuan Advice Teman2