简体   繁体   English

“ Chrome自定义标签”是否支持VectorDrawable?

[英]Does “Chrome custom tab” support VectorDrawable?

I work with "chrome custom tab"(cct) and everything runs OK 我使用“ chrome自定义标签”(cct),一切正常

However if I wanna add "actions" to buildIn Toolbar the cct works only with old "png" files under drawable directory. 但是,如果我想在buildIn工具栏中添加“操作”,则cct仅适用于可绘制目录下的旧“ png”文件。 I've switched to work with vector asset to generate vector-drawables and do all thing by using vector-drawable-compat, it seems that the cct doesn't work with it, right? 我转而使用矢量资产来生成vector-drawables,并通过使用vector-drawable-compat来完成所有操作,看来cct无法使用它,对吗?

Thanks for whom can give me an answer. 感谢谁能给我答案。

Unfortunately Chrome Custom Tab supports only the bitmap format, as explained in the platform_frameworks_support repository: 不幸的是,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"; 

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

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