【问题标题】:android TagHandler and CSSandroid TagHandler 和 CSS
【发布时间】:2013-01-13 12:46:25
【问题描述】:

我正在尝试使用 TextView 显示 HTML。我的 HTML 包含一些 CSS 样式。这是我的 HTML 示例。

<p><strong>bold </strong><em>&nbsp;italic </em><span style="text-decoration: underline;">underlined</span>&nbsp;<span style="text-decoration: line-through;">striked</span><span style="font-family: symbol;"> custom font</span><span style="font-size: large;"> bigger&nbsp;</span></p>
<br/><p style="text-align: right;"><span style="font-size: x-small;">aligned to right</span></p>
<br/><p style="text-align: center;"><span style="font-size: x-small;">aligned to center</span></p>
<br/><p style="text-align: justify;"><span style="font-size: x-small;">this text is justifyed&nbsp;</span></p>
<br/><p><span style="font-size: x-small; color: #ff0000;">colored&nbsp;</span></p>
<br/><p><span style="font-size: xx-large; color: #ff0000;"><span style="font-size: x-small;">symbol&nbsp;</span>&clubs;</span></p>

我可以使用 TagHandler 处理所有标签。但我无法获得有关样式的任何信息。是否可以使用 TagHandler 获取样式信息?

【问题讨论】:

    标签: android html css textview


    【解决方案1】:

    您可能已经解决了,但没有。 handleTag 方法只是将标签名称转换为 String 格式。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-01-14
      • 1970-01-01
      • 2016-07-24
      • 1970-01-01
      • 2015-12-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多