从Android TextView中的HTML订购的列表
我的意图是将HTML数据加载到文本视图中,以订购(1,2,3,4,..... N)列表 ..但是 UI总是在项目符号中显示比有序列表。我已经搜索并试图遵循一些解决方案,但没有任何可行。您的帮助将是惊人的,并且非常感谢。
我遵循的过程在下面给出。
dataBinding.tvBody.text = HtmlCompat.fromHtml(
text,
HtmlCompat.FROM_HTML_SEPARATOR_LINE_BREAK_DIV,
)
此处的值 text 是
<div><b>Test Data Added Here For EN</b></div><ol><li>15% on discount on video consultation and tele consultation with family medicine doctor, nutritionist, gynecologist, physiotherapist, & dental surgeon.</li><li>15% discount on home sample collections on any pathological test & imaging test.</li><li>15% discount on the 1st visit with family medicine doctor’s fee.</li><li>5% discount on annual health checkups.</li></ol>
My intention is to load HTML data into a textView as an ordered (1,2,3,4,.....n) list.But the UI shows always in bullet points rather than an ordered list. I have searched and tried to follow some solutions but nothing works. Your help would be amazing and much appreciated.
The procedure I followed is given underneath.
dataBinding.tvBody.text = HtmlCompat.fromHtml(
text,
HtmlCompat.FROM_HTML_SEPARATOR_LINE_BREAK_DIV,
)
Here the value of text is,
<div><b>Test Data Added Here For EN</b></div><ol><li>15% on discount on video consultation and tele consultation with family medicine doctor, nutritionist, gynecologist, physiotherapist, & dental surgeon.</li><li>15% discount on home sample collections on any pathological test & imaging test.</li><li>15% discount on the 1st visit with family medicine doctor’s fee.</li><li>5% discount on annual health checkups.</li></ol>
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论