本文整理汇总了Java中android.text.Html.TagHandler类的典型用法代码示例。如果您正苦于以下问题:Java TagHandler类的具体用法?Java TagHandler怎么用?Java TagHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
TagHandler类属于android.text.Html包,在下文中一共展示了TagHandler类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: a
import android.text.Html.TagHandler; //导入依赖的package包/类
public static SpannableStringBuilder a(String paramString, Html.TagHandler paramTagHandler)
{
if (paramString == null) {
return new SpannableStringBuilder();
}
if (paramTagHandler == null) {}
for (Spanned localSpanned = efj.y(paramString);; localSpanned = Html.fromHtml(paramString, null, paramTagHandler)) {
return a(new SpannableStringBuilder(localSpanned), null);
}
}
示例2: HtmlToSpannedConverter
import android.text.Html.TagHandler; //导入依赖的package包/类
public HtmlToSpannedConverter(String source,
ICustomFontLoader fontLoader, Html.ImageGetter imageGetter,
Html.TagHandler tagHandler, Parser parser) {
mSource = source;
mSpannableStringBuilder = new SpannableStringBuilder();
mFontLoader = fontLoader;
mImageGetter = imageGetter;
mTagHandler = tagHandler;
mReader = parser;
}
示例3: fromHtml
import android.text.Html.TagHandler; //导入依赖的package包/类
public static Spanned fromHtml(String text)
{
text = firstLineStyle(text);
text = spanToPseudoElement(text);
text = fixNewline(text);
TagHandler handler = new HtmlTagHandler();
return(Html.fromHtml(text,null,handler));
}
示例4: fromHtml
import android.text.Html.TagHandler; //导入依赖的package包/类
/**
* Converts HTML string to a {@link Spanned} text, adjusting formatting and using a custom
* image getter. Any extra new line characters at the end of the text will be trimmed.
*/
public static CharSequence fromHtml(Context context, String text, ImageGetter imageGetter,
TagHandler tagHandler) {
if (TextUtils.isEmpty(text)) {
return null;
}
return postprocess(context, Html.fromHtml(text, imageGetter, tagHandler));
}