Android图片的晃动效果
2015-12-13 22:40
375 查看
拉手反编译文件里面看到的
先上测试效果图
shake.xml
cycle_7.xml
先上测试效果图
shake.xml
<?xml version="1.0" encoding="utf-8"?> <translate xmlns:android="http://schemas.android.com/apk/res/android" android:duration="1000" android:fromXDelta="0.0" android:interpolator="@anim/cycle_7" android:toXDelta="10.0" />
cycle_7.xml
<?xml version="1.0" encoding="utf-8"?> <cycleInterpolator android:cycles="7.0" xmlns:android="http://schemas.android.com/apk/res/android" />
public void btn(View v) { Animation animation = AnimationUtils.loadAnimation(this, R.anim.shake); animation.setFillAfter(true); imageView1.startAnimation(animation); }
相关文章推荐
- Android笔记-Android启动之Launcher启动
- Android Studio常用快捷键(Windows默认)
- Android Circular Progress Button
- android studio快捷键大全
- Android ART简介
- 读书笔记-Android开发艺术探索-第11章-Android的线程和线程池
- [开源学习]SwipeMenuListView源码实现过程解析
- android中手机定位
- Android开发ListView使用OnScrollListener实现分页加载数据
- Android之异步任务AsyncTask解析Json数据
- Android之notification
- Android Studio 工程目录结构
- Android基础的xml文件创建,解析,以及安卓下的消息机制
- Android实践项目汇报(总结)-修改
- Android基础Fragment以及动画
- Android基础之Handler
- Android基础图形的一些表示方法,SoundPool,VideoView,SurfaceView
- android lint check的学习和自定义以及lint语法
- repo android
- android canvas.draw 注意