Example usage for android.text Html fromHtml

List of usage examples for android.text Html fromHtml

Introduction

In this page you can find the example usage for android.text Html fromHtml.

Prototype

@Deprecated
public static Spanned fromHtml(String source) 

Source Link

Document

Returns displayable styled text from the provided HTML string with the legacy flags #FROM_HTML_MODE_LEGACY .

Usage

From source file:Main.java

private static String decodeHtml(String in) {
    return Html.fromHtml(Html.fromHtml(in).toString()).toString();
}

From source file:Main.java

public static String decodeString(String param) {
    return Html.fromHtml(param).toString();
}

From source file:Main.java

public static String modifyHtmlQuote(String body) {
    return Html.fromHtml(body.replace("\n", "<br/>")).toString();
}

From source file:Main.java

public static String htmlDecode(String input) {
    return Html.fromHtml(input).toString();
}

From source file:Main.java

public static CharSequence fromHtmlAndStrip(String s) {
    return Html.fromHtml(s).toString().replace((char) 160, (char) 32).replace((char) 65532, (char) 32);
}

From source file:Main.java

public static String getFormattedValue(float f, String s) {
    return Html.fromHtml(String.format("%s %.2f", new Object[] { s, Float.valueOf(f) })).toString();
}

From source file:Main.java

static String httpDecode(String s) {
    s = s.replace("\r\n", "<br/>");
    return Html.fromHtml(s).toString();
}

From source file:Main.java

public static void formatHtml(TextView tv) {
    tv.setText(Html.fromHtml(tv.getText().toString()));
}

From source file:Main.java

public static Spanned stringToSpan(String src) {
    return src == null ? null : Html.fromHtml(src.replace("\n", "<br />"));
}

From source file:Main.java

public static int getWordCount(String content) {
    String text = Html.fromHtml(content.replaceAll("<img[^>]*>", "")).toString();
    return text.split("\\s+").length;
}