Html.fromHtml also understands header tags, from h1 to h6. The respective
relative sizes are:
private static final float[] HEADER_SIZES = {
1.5f, 1.4f, 1.3f, 1.2f, 1.1f, 1f,
};
-- K
2014-04-09 23:22 GMT+04:00 jraanamo <[email protected]>:
> As far as I can see, when converting from HTML string into spannable, only
> color and face are supported (this is with Android 4+ at least). Converting
> the otherway (Html.toHtml) adds more attributes like size. To control the
> size from HTML you are limited to <big> and <small> or add your own tag and
> implement Html.TagHandler. Remember that you can set the "base" text size
> of the TextView and then use <big> and <small> to go +/-.
>
> On Wednesday, 29 December 2010 15:41:02 UTC+2, genxsol wrote:
>>
>> Hi Dear,
>>
>> i am trying to put text on a text view with different size for each
>> word
>>
>> textView.setText(Html.fromHtml("<font size='10' color='red'> Word1 </
>> font> <font size='15' color='white'> Word2 </font>)));
>>
>> color does work but no font size, any help plz
>
> --
> 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 unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>
--
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.