android - Chrome 自定义标签颜色变化
问题描述
如何更改条形阴影、标题文本和进度条的颜色,如 Twitter(https://imgur.com/a/n0Rcbej)或 Telegram(https://imgur.com/a/U9QLiwR )的 Android 应用程序)?
这是我的应用程序(https://imgur.com/a/KGiLR9t)
我无法将标记元添加到 html。不使用标签怎么办?
CustomTabsIntent.Builder builder = new CustomTabsIntent.Builder();
builder.setToolbarColor(ResourcesCompat.getColor(getResources(), R.color.blue, null));
builder.enableUrlBarHiding();
CustomTabsIntent customTabsIntent = builder.build();
customTabsIntent.launchUrl(this, Uri.parse(url));
解决方案
设置 bar-shadow 颜色是不可能的,你可以设置颜色栏,它们将被填充为纯色,但不是所有颜色。我发现只有 3 种纯色:白色(#ffffff),如 twitter,黑色(#000000)和蓝色(#4d7f9e),如电报。
推荐阅读
- python - 占位符字段 - Django CMS
- adb - adb pull - 默认路径已更改
- c# - 难以从 API 接收 HTTP 响应 - 错误请求错误
- python - 如何将消息作为 mqtt 客户端累积 1 秒,然后将其保存到文件中
- flutter - 如何在 Flutter 中反转半径
- c# - 找到给定范围内数字总和最大的数字
- javascript - 为什么从其他子域调用时我的离线缓存子域页面没有加载?
- django - Django Annotate 在某些情况下不起作用
- python - 解压后计算 zip 文件的 S3 ETag
- sql-server - 在 Azure Devops for CI-CD 中使用 MSbuild 生成 Dacpac 文件很慢