Android将html数据加载到chrome自定义标签中

栏目: Html · 发布时间: 7年前

内容简介:它不能直接加载具有file:// url的HTML字符串或本地HTML文件到chrome自定义选项卡.但您可以实现本地服务器以在自定义Chrome选项卡中呈现脱机html内容.请参阅以下网址.

我想在我的应用中使用chrome自定义标签.我发现如何将数据从url加载到选项卡中,但我没有找到,如何使用html-tags从字符串值加载数据.如何从webview示例中进行类比功能:

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

在Chrome自定义标签?

它不能直接加载具有file:// url的HTML字符串或本地HTML文件到chrome自定义选项卡.

但您可以实现本地服务器以在自定义Chrome选项卡中呈现脱机html内容.请参阅以下网址.

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

翻译自:https://stackoverflow.com/questions/40552105/android-load-html-data-into-chrome-custom-tabs


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。

Out of their Minds

Out of their Minds

Dennis Shasha、Cathy Lazere / Springer / 1998-07-02 / USD 16.00

This best-selling book is now available in an inexpensive softcover format. Imagine living during the Renaissance and being able to interview that eras greatest scientists about their inspirations, di......一起来看看 《Out of their Minds》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

SHA 加密
SHA 加密

SHA 加密工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具