程序包 dev.utils.common
类 HtmlUtils
java.lang.Object
dev.utils.common.HtmlUtils
detail: Html 工具类
- 作者:
- Ttt
-
字段概要
字段 -
方法概要
修饰符和类型方法说明static StringaddHtmlBold(String content) 为给定的字符串添加 HTML 加粗标记static StringaddHtmlColor(String content, String color) 为给定的字符串添加 HTML 颜色标记static StringaddHtmlColor(String format, String content, String color) 为给定的字符串添加 HTML 颜色标记static StringaddHtmlColorAndBold(String content, String color) 为给定的字符串添加 HTML 颜色标记并加粗static StringaddHtmlDIV(String content) 为给定的字符串添加 HTML DIV 标签static StringaddHtmlDIVByMargin(String content, String margin) 为给定的字符串添加 HTML DIV 标签static StringaddHtmlDIVByMarginPadding(String content, String margin, String padding) 为给定的字符串添加 HTML DIV 标签static StringaddHtmlDIVByPadding(String content, String padding) 为给定的字符串添加 HTML DIV 标签static StringaddHtmlIMG(String url) 为给定的字符串添加 HTML IMG 标签static StringaddHtmlIMG(String url, String width, String height) 为给定的字符串添加 HTML IMG 标签static StringaddHtmlIMGByHeight(String url, String height) 为给定的字符串添加 HTML IMG 标签static StringaddHtmlIMGByWidth(String url, String width) 为给定的字符串添加 HTML IMG 标签static StringaddHtmlIncline(String content) 为给定的字符串添加 HTML 字体倾斜static StringaddHtmlOverLine(String content) 为给定的字符串添加 HTML 上划线static String为给定的字符串添加 HTML P 标签static StringaddHtmlSPAN(String content) 为给定的字符串添加 HTML SPAN 标签static StringaddHtmlStrikeThruLine(String content) 为给定的字符串添加 HTML 中划线static StringaddHtmlUnderline(String content) 为给定的字符串添加 HTML 下划线static StringaddRemovePaddingMargin(String html) 为给定的 Html 移除 padding、marginstatic StringkeywordReplaceHtmlColor(String content, String keyword, String color) 将给定的字符串中所有给定的关键字标色
-
字段详细资料
-
REMOVE_PADDING_MARGIN_STYLE
- 另请参阅:
-
-
方法详细资料
-
addRemovePaddingMargin
为给定的 Html 移除 padding、margin- 参数:
html- HTML 字符串- 返回:
- Html 内容字符串
-
addHtmlColor
为给定的字符串添加 HTML 颜色标记- 参数:
content- 给定的字符串color- 颜色值, 如: #000000- 返回:
- Html 内容字符串
-
addHtmlColor
为给定的字符串添加 HTML 颜色标记- 参数:
format- 格式化字符串content- 给定的字符串color- 颜色值, 如: #000000- 返回:
- Html 内容字符串
-
addHtmlBold
为给定的字符串添加 HTML 加粗标记- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlColorAndBold
为给定的字符串添加 HTML 颜色标记并加粗- 参数:
content- 给定的字符串color- 颜色值, 如: #000000- 返回:
- Html 内容字符串
-
addHtmlUnderline
为给定的字符串添加 HTML 下划线- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlStrikeThruLine
为给定的字符串添加 HTML 中划线- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlOverLine
为给定的字符串添加 HTML 上划线- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlIncline
为给定的字符串添加 HTML 字体倾斜如果需要倾斜自定义角度, 需要自定义 TextView, 在 onDraw 里面加上倾斜度, 上下左右居中 canvas.rotate( 倾斜角度, getMeasuredWidth() / 3, getMeasuredHeight() / 3);- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlSPAN
为给定的字符串添加 HTML SPAN 标签- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlP
为给定的字符串添加 HTML P 标签- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlIMG
为给定的字符串添加 HTML IMG 标签- 参数:
url- 图片链接- 返回:
- Html 内容字符串
-
addHtmlIMG
为给定的字符串添加 HTML IMG 标签- 参数:
url- 图片链接width- 图片宽度height- 图片高度- 返回:
- Html 内容字符串
-
addHtmlIMGByWidth
为给定的字符串添加 HTML IMG 标签- 参数:
url- 图片链接width- 图片宽度- 返回:
- Html 内容字符串
-
addHtmlIMGByHeight
为给定的字符串添加 HTML IMG 标签- 参数:
url- 图片链接height- 图片高度- 返回:
- Html 内容字符串
-
addHtmlDIV
为给定的字符串添加 HTML DIV 标签- 参数:
content- 给定的字符串- 返回:
- Html 内容字符串
-
addHtmlDIVByMargin
为给定的字符串添加 HTML DIV 标签- 参数:
content- 给定的字符串margin- margin 边距- 返回:
- Html 内容字符串
-
addHtmlDIVByPadding
为给定的字符串添加 HTML DIV 标签- 参数:
content- 给定的字符串padding- padding 边距- 返回:
- Html 内容字符串
-
addHtmlDIVByMarginPadding
为给定的字符串添加 HTML DIV 标签- 参数:
content- 给定的字符串margin- margin 边距padding- padding 边距- 返回:
- Html 内容字符串
-
keywordReplaceHtmlColor
将给定的字符串中所有给定的关键字标色- 参数:
content- 给定的字符串keyword- 给定的关键字color- 颜色值, 如: #000000- 返回:
- Html 内容字符串
-