【发布时间】:2016-07-25 10:24:16
【问题描述】:
我想使用 Html.FromHTML() 在 android textview 中显示嵌入 URL。
我得到这个 JSON 字符串
"<!DOCTYPE html>\r\n<html>\r\n<head>\r\n</head>\r\n<body>\r\n<p style=\"text-align: justify;\"><span data-sheets-value=\"{"1":2,"2":"This video is about hip hop dance done by Amit. He moved his leg from one of the A R Rahman album which Humma Humma song. The steps are too awesome which made you to shake your legs. Watch this to start shake your legs."}\" data-sheets-userformat=\"{"2":7043,"3":{"1":0},"4":{"1":2,"2":16777215},"10":0,"11":4,"12":0,"14":{"1":2,"2":3355443},"15":"\\"Arial\\",\\"sans-serif\\""}\">This video is about hip hop dance done by Amit. He moved his leg from one of the A R Rahman album which Humma Humma song. The steps are too awesome which made you to shake your legs. Watch this to start shake your legs.</span></p>\r\n<p style=\"text-align: justify;\"><span data-sheets-value=\"{"1":2,"2":"This video is about hip hop dance done by Amit. He moved his leg from one of the A R Rahman album which Humma Humma song. The steps are too awesome which made you to shake your legs. Watch this to start shake your legs."}\" data-sheets-userformat=\"{"2":7043,"3":{"1":0},"4":{"1":2,"2":16777215},"10":0,"11":4,"12":0,"14":{"1":2,"2":3355443},"15":"\\"Arial\\",\\"sans-serif\\""}\">
<iframe src=\"//www.youtube.com/embed/mhIDO6YMx80\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"></iframe></span></p>\r\n</body>\r\n</html>"
我正在使用 Html.FromHTML() 在TextView 中显示此内容。在这我知道<iframe src> 标签在android Html.FromHTML() 中不支持。取而代之的是,我如何显示视频。在 JSON HTML 字符串中,它将图像、文本和视频等等。
请任何人有想法,分享它。提前致谢。
【问题讨论】:
标签: android html json iframe textview