ah right SpannableStringBuilder seems to be the way to go.

Thanks I will give it a go


Pam

----- Original Message ----- From: "Mark Murphy" <[email protected]>
To: <[email protected]>
Sent: Monday, September 10, 2012 12:12 PM
Subject: Re: [android-developers] How to increase textsize


Either use two TextViews, or create your text using a
SpannableStringBuilder and apply appropriate spans for formatting, or
create your text as HTML and use Html.fromHtml() to create the Spanned
object that you pass to setText().

On Mon, Sep 10, 2012 at 5:26 AM, plw <[email protected]> wrote:
How do I make the size of text larger than the rest of the text that follow it so that it look like a heading? I have tried using setTextSize but it
doesn't have any effect when I run eclipse when I do this




                                       TextView tv1 = new
TextView(v.getContext());
Float textsize = tv1.getTextSize();
                                        tv1.setText("\n" +
TempTempstr[1].replaceAll("&amp;", "&") + ", " + TempTempstr[2] + ", " +
TempTempstr[3]);
                                        tv1.setTypeface(null,
Typeface.BOLD);
                                        tv1.setTextSize(textsize + 2);
                                        LinearLayout.addView(tv1);



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



--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

Android Training in NYC: http://marakana.com/training/android/

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

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