zoukankan      html  css  js  c++  java
  • 关于矢量图片资源向后兼容:CompatVectorFromResourcesEnabled标志的使用

    StackOverflow上摘抄的:
    some things have changed since I asked this question so I will answer it myself.
    With Support Library 23.4.0 the support for VectorDrawables from Ressources was reenabled: Android Support Library 23.4.0 available now
    You can find more information on that in this cast from the Google I/O 2016: What's new in the support library - Google I/O 2016 
    You need to add this to every Activity where you want to use VectorDrawables on devices below Android 5:
    static {
    AppCompatDelegate.setCompatVectorFromResourcesEnabled(true);
    }
    So you can now use VectorDrawables in DrawableContainers but it can still cause some issues as mentioned in the sources above so use it with caution.
    I did not reenable this feature in my app so far but I will change a lot of my icons to VectorDrawables with my next major release and will then dive deeper into this topic.
  • 相关阅读:
    拯救公主
    爱情之路
    无聊的会议
    对拍检验程序
    TCP三次握手
    OA系统走过的的坑之部门岗位管理
    蓝屏警告
    三级联动
    Ajax二级联动
    近期疑惑和总结
  • 原文地址:https://www.cnblogs.com/glowworm/p/6907763.html
Copyright © 2011-2022 走看看