android - "Chrome custom tab"支持VectorDrawable吗?

标签 android google-chrome chrome-custom-tabs

我使用“chrome 自定义选项卡”(cct),一切运行正常。

但是,如果我想将“ Action ”添加到内置工具栏,则 cct 仅适用于可绘制目录下的旧“png”文件。我已转而使用矢量资源来生成矢量绘图,并使用矢量绘图兼容来完成所有操作,似乎 cct 无法使用它,对吗?

谢谢谁能给我答案。

最佳答案

不幸的是,Chrome 自定义选项卡仅支持位图格式,如 platform_frameworks_support 中所述。存储库:

/**
 * Key that specifies the {@link Bitmap} to be used as the image source for the action button.
 *  The icon should't be more than 24dp in height (No padding needed. The button itself will be
 *  48dp in height) and have a width/height ratio of less than 2.
 */
public static final String KEY_ICON = "android.support.customtabs.customaction.ICON";

关于android - "Chrome custom tab"支持VectorDrawable吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36183376/

相关文章:

android - 错误 :Unable to resolve dependency for ':app@debugAndroidTest/compileClasspath' : Could not resolve junit:junit:4. 12

Android - 运动布局语法错误 : No Valid LayoutDescription

javascript - Chrome 是否支持 "addEventListener"?

ajax - 在 Safari 扩展中编写与 Chrome 的 onBeforeRequest 等效的代码

chromium-embedded - Chrome 自定义选项卡是否受到新的 Google Chromium 嵌入式框架限制的影响?

java - FragmentPagerAdapter 在重新选择时返回半中断 View

android - Android Studio Multi-dex Gradle无法在Mac上识别Java

CSS 在 chrome 和 firefox 中呈现不同

java - 从 RecyclerView 适配器启动 Chrome 自定义选项卡

android - 在 Chrome 自定义选项卡中检测到内存泄漏