android开源动画库nineoldandroids
来源:互联网 发布:佳能ip2880清零软件 编辑:程序博客网 时间:2024/06/05 14:35
项目官网地址:http://nineoldandroids.com/
使用这个库的原因是android3.0之后出了新的animation API,但是android3.0以下的不支持
这个库完成了这个兼容性,使得ValueAnimator、ObjectAnimator等新的动画api能不改一行代码,只修改import的包名就完全兼容到新的api
比如下面这段代码,在eclipse中用2.3的build target来编译就不行,你必须用3.0以上的target来编译,但是编译好了之后用2.3的模拟器照样跑,照样有动画。不要在低版本的Android编译器如2.2、2.3上来写代码,这样eclipse会校验有误,编译通不过。
@TargetApi(Build.VERSION_CODES.HONEYCOMB)private void manageLayer(View v, boolean enableHardware) {
if (!API_11) return;
int layerType = enableHardware ? View.LAYER_TYPE_HARDWARE : View.LAYER_TYPE_NONE;
if (layerType != v.getLayerType())
v.setLayerType(layerType, null);
}
0 0
- android开源动画库nineoldandroids
- android开源动画库nineoldandroids
- android开源动画库nineoldandroids
- Android--开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- Android动画进阶—使用开源动画库nineoldandroids
- 自定义控件(五)画一条线
- QT 总结(二) Qt Creator应用程序发布及修改应用程序图标的方法
- HTTP状态码
- 几何画板中怎样绘制圆柱
- HDU 4998 Rotate (2014年鞍山赛区网络赛B题)
- android开源动画库nineoldandroids
- CentOS6.5 heartbeat高可用集群的详解及工作流程
- accept: Invalid argument
- PCM DUMP
- cookie和session的工作机制
- .NET Webservice部署映射服务器端口的莫名其妙的问题
- CentOS下更换yum源
- winform等待游标
- css样式插入