简体   繁体   中英

Does “Chrome custom tab” support VectorDrawable?

I work with "chrome custom tab"(cct) and everything runs OK

However if I wanna add "actions" to buildIn Toolbar the cct works only with old "png" files under drawable directory. 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?

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:

 /** * 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"; 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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