remote_recording_transition.xml 文件

<?xml version="1.0" encoding="utf-8"?>
<animation-list
xmlns:android="http://schemas.android.com/apk/res/android"
android:oneshot="false"> 
<item android:drawable="@drawable/remote_recording" android:duration="800"></item>
<item android:drawable="@drawable/remote_recording_run" android:duration="800"></item>
</animation-list>

android:oneshot="false" 是否循环播放,flase是循环播放 true只播一次

android:duration="800" 间隔时间

java代码

private AnimationDrawable recordingTransition;

recording=(ImageView)findViewById(R.id.recording);

recording.setBackgroundResource(R.drawable.remote_recording_transition);

recordingTransition = (AnimationDrawable) recording.getBackground();

recordingTransition.start();


--------------------------可以加我微信号:googlecao 进行交流------------------------

                       微笑如果你觉得此文章对你有用,给我点动力,请我喝杯奶茶咯微笑


更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. Android取日志的实用方法,Notepad++插件—
  2. 回调机制在 Android(安卓)监听用户界面操
  3. android注入so,有代码有命令
  4. 单击事件与触摸事件的区别
  5. 转:抗锯齿方法两种(其一:paint.setAntiAlias
  6. Android(安卓)4.1性能分析的一般步骤(二)
  7. 【Android的从零单排开发日记】之入门篇(
  8. Flutter 1.0 正式版: Google 的跨平台 UI
  9. Kotlin学习之路(1)环境介绍及安装
  10. Android(安卓)API Guides---Text and Inp