SVG向下兼容-from动脑学院
2017-06-06 20:47
309 查看
兼容问题,5.0以上的可以直接用:
一、兼容5.0以下的版本
一、兼容5.0以下的版本
1、使用Android Studio 2.2以上的版本,gradle版本在2.0以上,准备步骤 1.1、添加 defaultConfig { vectorDrawables.useSupportLibrary = true } 1.2、添加 compile 'com.android.support:appcompat-v7:25.3.1' //需要是23.2 版本以上的 1.3、Activity需要继承与AppCompatActivity 1.4、布局文件当中添加 xmlns:app="http://schemas.android.com/apk/res-auto" 2、使用在Actvity前面添加一个flag设置 static { AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); } 2.1 ImageView/ImageButton XML app:srcCompat 代码里面使用无区别 2.2 Button 不支持app:srcCompat Xml 使用在Button的selector 2.3 RadioButton 直接使用 2.4 textview的drawable 直接使用 2.5 使用的动态Vector Drawable 主要是不能直接修改 pathData 不能使用自定义interpolator
相关文章推荐
- 一些SVG向下兼容优雅降级技术
- IPv4地址何去何从 IPv6不向下兼容的尴尬
- Android开源项目发现--- 工具类向下兼容篇(持续更新)
- Oracle 导入导出另一种方式 11g 到10g 向下兼容
- symbian 9.1将不再向下兼容喽zz
- 向上兼容与向下兼容
- 关于ActionBar的向下兼容
- 序列化问题中的向上兼容和向下兼容解决方案
- javascript:google 向上向下滚动特效,兼容IE6,7,8,FF
- .net framework2.0不能向下兼容?
- IOS7 适配以及向下兼容问题
- JS无间隙滚动向左、向右、向上、向下兼容IE,firefox
- SVG文字缩放(文字多的时候不兼容火狐和IE)
- iOS7适配以及向下兼容
- 关于Android 版本向下兼容
- Android7.0及以上相机相册调用闪退处理封装,向下兼容
- 解决ValueAnimator.pause()与resume()向下不兼容
- javascript:google向上向下滚动特效,兼容IE6,7,8,FF
- maven自动部署web项目到tomcat8(向下兼容7)
- OpenCms v6.2千寻汉化包 v1.1版下载(向下兼容OpenCms v6.0.X)