Книга: Beginning Android

Styled Text

Styled Text

If you want really rich text, you should have raw resources containing HTML, then pour those into a WebKit widget. However, for light HTML formatting, using <b>, <i>, and <u>, you can just use a string resource:

 <string name="b">This has <b>bold</b> in it.</string>
 <string name="i">Whereas this has <i>italics</i>!</string>

You can access these the same as with plain strings, with the exception that the result of the getString() call is really an object supporting the android.text.Spanned interface:


Оглавление книги

Оглавление статьи/книги

Генерация: 0.862. Запросов К БД/Cache: 3 / 0
Вверх Вниз