Html

Class of android.text · Html.java · Android's reference

public class Html

Styled text from HTML, and HTML from styled text. The parser reads the tags that Android's documentation lists. A TagHandler gets the other tags, with a null XMLReader.

Nested types

Fields

public static final int TO_HTML_PARAGRAPH_LINES_CONSECUTIVE = 0 source
public static final int TO_HTML_PARAGRAPH_LINES_INDIVIDUAL = 1 source
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_PARAGRAPH = 1 source
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_HEADING = 2 source
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_LIST_ITEM = 4 source
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_LIST = 8 source
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_DIV = 16 source
public static final int FROM_HTML_SEPARATOR_LINE_BREAK_BLOCKQUOTE = 32 source
public static final int FROM_HTML_OPTION_USE_CSS_COLORS = 256 source
public static final int FROM_HTML_MODE_LEGACY = 0 source
public static final int FROM_HTML_MODE_COMPACT = 63 source

Methods

public static Spanned fromHtml(String source) deprecated source
public static Spanned fromHtml(String source, int flags) source
public static Spanned fromHtml(String source, ImageGetter imageGetter, TagHandler tagHandler) deprecated source
public static Spanned fromHtml(String source, int flags, ImageGetter imageGetter, TagHandler tagHandler) source
public static String toHtml(Spanned text) deprecated source
public static String toHtml(Spanned text, int option) source
public static String escapeHtml(CharSequence text) source

Made from ScarletNX's Sail at 166ad3910f80. The framework is ScarletNX's (GPL-3.0-or-later); the parts that follow the Android Open Source Project's sources (Apache-2.0) say so in their files.