The size attribute is just ignored. Only "color" and "face" attributes
takes into account. But you can use the Spannable
span.setSpan(new RelativeSizeSpan(0.8f), start, end,
Spannable.SPAN_EXCLUSIVE_EXCLUSIVE)
or the content, content content
attributes of HTML to set the corresponding
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
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 jukka.raan...@gmail.com:
As far as I can see, when
3 matches
Mail list logo