android Animation 动画效果收集
来源:互联网 发布:北京赛车计划软件 编辑:程序博客网 时间:2024/05/22 13:20
1.点击后放大缩小实现
Android的事件:onClick, onScroll, onFling等等,都是由许多个Touch组成的。其中Touch的第一个状态肯定是ACTION_DOWN, 表示按下了屏幕。之后,touch将会有后续事件
对控件进行设置点击事件
findViewById(R.id.layout_click).setOnTouchListener(this);findViewById(R.id.layout_click).setOnClickListener(this);
@Overridepublic boolean onTouch(View v, MotionEvent event) {switch (event.getAction()) {case MotionEvent.ACTION_DOWN: //if(v.getId()==R.id.layout_click){Animation animation=new ScaleAnimation(1.0f, 0.9f, 1.0f, 0.9f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);animation.setDuration(100);animation.setFillAfter(true);v.startAnimation(animation);}break;case MotionEvent.ACTION_UP: //if(v.getId()==R.id.layout_click){Animation animation=new ScaleAnimation(0.9f, 1.0f, 0.9f, 1.0f, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);animation.setDuration(100);animation.setFillAfter(true);v.startAnimation(animation);}break;default:break;}return false;}
0 0
- android Animation 动画效果收集
- Android 动画效果 --Animation
- Android 动画效果 --Animation
- Android 动画效果 --Animation
- Android Animation动画效果
- android Animation 动画效果
- android Animation 动画效果
- Android 动画效果animation
- Android动画(Animation)效果
- android Animation动画效果
- Android - Animation动画效果
- Android:Animation动画效果
- android动画效果Animation
- 动画效果Animation-android
- android-Animation动画效果
- Android动画---Animation动画效果
- Android 动画效果 --Animation 动画
- Android 动画效果 --Animation 动画
- Hello博客
- 错误 1130: Host '***.***.***.***' is not allowed to connect to this MySQL
- messagepack 初试
- 解决Xcode7.1上传成功但iTunesconnect一直不能构建版本的问题
- 解决OracleRAC集群下创建SDE时报Stored procedures错误问题
- android Animation 动画效果收集
- No location, value may have been optimized out
- Centos 7 学习之静态IP设置
- 内联函数
- [转]写给新手程序员的一封信
- Servlet—Servlet简介、Servlet调用过程
- Android学习之路1
- How to create an XTR file from XML in Delphi XE4 using XML Mapper?(delphi中如何通过xmlmapper创建xtr文件)
- 位运算状态压缩——飞行员兄弟的冰箱