1. 在 layout下建立文件夹 animator写入动画文件xml
<?xml version="1.0" encoding="utf-8"?>
<!--<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:duration="3000"-->
<!--android:propertyName="textSize"-->
<!--android:valueType="floatType"-->
<!--android:valueFrom="10.0"-->
<!--android:valueTo="40.0"-->
<!--android:repeatCount="-1"-->
<!--android:repeatMode="reverse"-->
<!--/>-->
<!--<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:duration="3000"-->
<!--android:propertyName="alpha"-->
<!--android:valueType="floatType"-->
<!--android:valueFrom="0.0"-->
<!--android:valueTo="1.0"-->
<!--android:repeatCount="-1"-->
<!--android:repeatMode="reverse" />-->

<!--<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:duration="3000"-->
<!--android:propertyName="translationX"-->
<!--android:valueType="floatType"-->
<!--android:valueFrom="0.0"-->
<!--android:valueTo="300.0"-->
<!--android:repeatCount="-1"-->
<!--android:repeatMode="reverse" />-->
<!--<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:duration="3000"-->
<!--android:propertyName="rotation"-->
<!--android:valueType="floatType"-->
<!--android:valueFrom="0.0"-->
<!--android:valueTo="360.0"-->
<!--android:repeatCount="-1"-->
<!--android:repeatMode="restart" />-->

<!--<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:duration="3000"-->
<!--android:propertyName="scaleX"-->
<!--android:valueType="floatType"-->
<!--android:valueFrom="0.0"-->
<!--android:valueTo="2.0"-->
<!--android:repeatCount="-1"-->
<!--android:repeatMode="reverse" />-->

<!--android:translationX=""-->
<!--android:alpha=""-->
<!--android:rotation=""-->
<!--android:scaleX=""-->

<set android:ordering="together"
xmlns:android="http://schemas.android.com/apk/res/android">

<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:propertyName="rotationY"
android:valueType="floatType"
android:valueFrom="0.0"
android:valueTo="360.0"
android:repeatCount="-1"
android:repeatMode="restart" />

<!--<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"-->
<!--android:duration="3000"-->
<!--android:propertyName="translationY"-->
<!--android:valueType="floatType"-->
<!--android:valueFrom="0.0"-->
<!--android:valueTo="300.0"-->
<!--android:repeatCount="-1"-->
<!--android:repeatMode="reverse" />-->

<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="3000"
android:propertyName="textSize"
android:valueType="floatType"
android:valueFrom="10.0"
android:valueTo="16.0"
android:repeatCount="-1"
android:repeatMode="reverse"
/>

<objectAnimator xmlns:android="http://schemas.android.com/apk/res/android"
android:duration="1000"
android:propertyName="textColor"
android:valueType="colorType"
android:valueFrom="#95868686"
android:valueTo="#951455ed"
android:repeatCount="-1"
android:repeatMode="reverse"
/>

</set>




2. JAVA加载
tv=(TextView) findViewById(R.id.tv);
// 1 context
Animator animator= AnimatorInflater.loadAnimator(MainActivity.this,R.animator.animator);
animator.setTarget(tv);
animator.start();

安卓——animotion的更多相关文章

  1. 一起学微软Power BI系列-使用技巧(3)Power BI安卓手机版安装与体验

    Power BI有手机版,目前支持安卓,苹果和WP,不过没有WP手机,苹果在国内还不能用,要FQ和用就不测试了.安卓的我也也是费了九牛二虎之力才把app下载下来,把方法分享给大家. FQ太麻烦,所以建 ...

  2. 安卓易学,爬坑不易——腾讯老司机的RecyclerView局部刷新爬坑之路

    针对手游的性能优化,腾讯WeTest平台的Cube工具提供了基本所有相关指标的检测,为手游进行最高效和准确的测试服务,不断改善玩家的体验.目前功能还在免费开放中. 点击地址:http://wetest ...

  3. 极光推送和友盟推送,ios端和安卓端的后端调试设置

    我是最后端的,这两天搞了一个app项目,前端安卓使用友盟很方便,调试比较顺利,然后ios就遇到各种问题了,证书.发送成功推送不成功,测试时用的TestMode(),ios上架之后就必须用product ...

  4. 体验报告:微信小程序在安卓机和苹果机上的区别

    很多人可能会问:微信小程序和在微信里面浏览一个网页有什么区别? 首先,小程序的运行是全屏的,界面跟进入了一个APP很像,更为沉浸跟在微信里面访问h5不一样:其次,它的浏览体验更为稳定. 不过,这还不够 ...

  5. 安卓自定义组合控件--toolbar

    最近在学习安卓APP的开发,用到了toolbar这个控件, 最开始使用时include layout这种方法,不过感觉封装性不好,就又改成了自定义组合控件的方式. 使用的工具为android stud ...

  6. 安卓客户端a标签长按弹框提示解决办法

    昨天工作时候发现一个bug,是关于a标签的,在安卓客户端中,如果是a标签的话,长按会出现一个弹框,如图所示 是因为安卓客户端的长按触发机制,以后进行wap端开发的时候,如果用到跳转页面尽量不要用a标签 ...

  7. ionic第二坑——ionic 上拉菜单(ActionSheet)安卓样式坑

    闲话不说,先上图: 这是IOS上的显示效果,代码如下: HTML部分: <body ng-app="starter" ng-controller="actionsh ...

  8. ReactNative入门(安卓)——API(下)

    LayoutAnimation - layout动画 当布局发生改变时的动画模块,它有两个方法: 1. 最常用的方法是 LayoutAnimation.configureNext(conf<Ob ...

  9. ReactNative入门(安卓)——API(上)

    Alert - 弹窗 通过 Alert.alert() 方法调用唤起原生弹窗,点击会触发 onPress 回调(参考下方代码)并清除弹窗. import React, { AppRegistry, C ...

随机推荐

  1. 论文阅读:Learning Visual Question Answering by Bootstrapping Hard Attention

    Learning Visual Question Answering by Bootstrapping Hard Attention Google DeepMind  ECCV-2018   2018 ...

  2. Gitflow 视频讲解

      How to use a scalable Git branching model called Gitflow   git视频合集列表   github大本营   gitflow中文备忘清单   ...

  3. js实例分析JavaScript中的事件委托和事件绑定

    我们在学习JavaScript中,难免都会去网上查一些资料.也许偶尔就会遇到“事件委托”(也有的称我“事件代理”,这里不评论谁是谁非.以下全部称为“事件委托”),尤其是在查JavaScript的事件处 ...

  4. 4、lvs nat和dr类型演示

    实战操作 LVS-NAT  (应用场景:VIP是公网地址,DIP和RIP一般使用私网地址,NAT的主要目的是为了隐藏服务器) 核心要点: 1.DIP与各real server的RIP必须在同一个网段中 ...

  5. git core.autocrlf配置 解决Windows和Linux(Mac)换行问题

    格式化 格式化是许多开发人员在协作时,特别是在跨平台情况下,遇到的令人头疼的细小问题. 由于编辑器的不同或者Windows程序员在跨平台项目中的文件行尾加入了回车换行符, 一些细微的空格变化会不经意地 ...

  6. 总结react native 事件机制

    React 事件机制 一个组件的所有事件会使用统一的事件监听器,绑定到组件的最外层,那么如何使用? bind方法,绑定并且可以传递参数 <TouchableOpacity onPress={th ...

  7. git创建、删除分支

    //创建分支 git branch branchname //创建并切换到新分支 git checkout -b branchname //远程分支 git push origin branchnam ...

  8. vue中使用vw适配移动端

    推荐看看大漠老师的文章,非常的有收获 如何在Vue项目中使用vw实现移动端适配 1.首先在项目中安装依赖 npm i postcss-aspect-ratio-mini postcss-px-to-v ...

  9. Integer与int区别

    Integer与int的区别:估计大多数人只会说道两点,一开始我也不太清楚,Ingeter是int的包装类,int的初值为0,Ingeter的初值为null.但是如果面试官再问一下Integer i ...

  10. python 自动化测试Jenkins 持续集成

    一直在做 python 自动化测试,但是脚本的执行之前是运维来维护的,通过 saltstack, 自己并未做过多的研究,后续可以研究一下 saltstack. 今天先研究一下使用 github 管理项 ...