2016-07-25 8 views
0

Html.FromHTML()を使ってアンドロイドのテキストビューに埋め込みURLを表示したいと思います。埋め込みビデオURLをHtml.FromHTMLに表示するには

私はHtml.FromHTMLを使用してTextViewにこの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=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;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.&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:7043,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;10&quot;:0,&quot;11&quot;:4,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:3355443},&quot;15&quot;:&quot;\\&quot;Arial\\&quot;,\\&quot;sans-serif\\&quot;&quot;}\">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=\"{&quot;1&quot;:2,&quot;2&quot;:&quot;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.&quot;}\" data-sheets-userformat=\"{&quot;2&quot;:7043,&quot;3&quot;:{&quot;1&quot;:0},&quot;4&quot;:{&quot;1&quot;:2,&quot;2&quot;:16777215},&quot;10&quot;:0,&quot;11&quot;:4,&quot;12&quot;:0,&quot;14&quot;:{&quot;1&quot;:2,&quot;2&quot;:3355443},&quot;15&quot;:&quot;\\&quot;Arial\\&quot;,\\&quot;sans-serif\\&quot;&quot;}\"> 
<iframe src=\"//www.youtube.com/embed/mhIDO6YMx80\" width=\"560\" height=\"314\" allowfullscreen=\"allowfullscreen\"></iframe></span></p>\r\n</body>\r\n</html>" 

私はこれを表示していますを取得しています()。これで私は<iframe src>タグはアンドロイドHtml.FromHTML()でサポートされません知っている。代わりに、私はどのようにビデオを表示することができます。 JSON HTML Stringでは、&テキスト&ビデオとすべてをイメージします。

いずれか1つは、アイデアを持って、それを共有してください。前もって感謝します。

答えて

2

Html.FromHTML()を使用して、Androidのテキストビューに埋め込みURLを表示します。

できません。 Html.FromHtml()は/パース、これに代えて

iframeがどのように私はビデオを表示することができます処理しない

あなたはWebViewを使用する必要があります。または、そのすべての制限

+0

IとYouTube sdkを使用することができますwebviewを使いたくありません。それはうまく見えませんでした。 –

+1

私があなたに与えることができる唯一のアドバイスは、すべての制限付きでYouTube SDKを使用することです。 – Blackbelt

+0

私はYoutube SDKで行うことができます。しかし、私のシナリオでは、そのHtmlコンテンツは、複数のものがテキストテキストをリンクします。だから私は絶対にURLを取ることはできませんとSDKでロードします。基本的にウェブサイトのエディタのユーザーからの説明を記述します。その内容が来るように。 –

関連する問題