动画 -- 按钮 --- 从无到有(中心)
动画 -- --- 按钮 中心
2023-09-14 09:00:22 时间
1 // sa = new ScaleAnimation(0, 1, 0, 1,100,50);
2 // sa = new ScaleAnimation(0, 1, 0, 1, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f)
3 // sa.setDuration(1000);
4
5 findViewById(R.id.btnScaleMe).setOnClickListener(new View.OnClickListener() {
6 @Override
7 public void onClick(View arg0) {
8 arg0.startAnimation(AnimationUtils.loadAnimation(MainActivity.this, R.anim.sa));
9 }
10 });
1 <?xml version="1.0" encoding="utf-8"?>
2 <scale xmlns:android="http://schemas.android.com/apk/res/android"
3 android:fromXScale="0"
4 android:toXScale="1"
5 android:fromYScale="0"
6 android:toYScale="1"
7 android:duration="1000"
8 android:pivotX="50%"
9 android:pivotY="50%" >
10
11 </scale>
相关文章
- 用SpriteBuilder简化"耕牛遍地走"的动画效果(二)
- anijs 一个小巧的动画库
- JS框架_(JQuery.js)绚丽的3D星空动画
- CSS 动画 : 3D翻页动画
- 深入理解CSS3 Animation 帧动画
- IOS学习资源收集--关于动画的代码学习资源总汇(很棒的动画效果哦)
- 动画 -- 按钮 -- 左右晃动
- 《android开发艺术探索》读书笔记(七)--动画
- 【属性动画总结】Property Animation
- 63、具有过渡动画效果的布局Layout
- Fiori应用的花瓣动画效果是怎么画出来的
- android布局中显示隐藏动画
- ScaleAnimation类:尺寸变化动画类
- leaflet: 一个marker的世界旅行动画(077)
- uwp 动画之圆的放大与缩小