简体   繁体   English

Android将HTML数据加载到Chrome自定义标签中

[英]Android load html data into chrome custom tabs

I want to use chrome custom tabs in my app. 我想在我的应用中使用Chrome自定义标签。 I found how to load data from url into tabs, but i didnt find, how to load data from string value with html-tags. 我找到了如何从url到选项卡中加载数据,但是我没有找到如何从具有html-tags的字符串值中加载数据。 How to make analogous functional from webview-example: 如何从webview-example实现类似功能:

webViewContent.loadDataWithBaseURL(null, htmlText, "text/html", "UTF-8", null);

in chrome custom tabs? 在chrome自定义标签中?

Its not directly possible to load a HTML string or local HTML file having file:// url to chrome custom tabs. 无法直接将HTML字符串或具有file:// url的本地HTML文件加载到chrome自定义标签中。

But you can implement Local Server to render offline html content in Custom chrome tabs. 但是,您可以实现本地服务器以在“自定义镶边”标签中呈现脱机html内容。 refer following URL. 请参考以下网址。

https://bitbucket.org/snippets/pkumarad/qAk6x https://bitbucket.org/snippets/pkumarad/qAk6x

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM