码迷,mamicode.com
首页 > 其他好文 > 详细

动画 -- 按钮 --- 从无到有(中心)

时间:2014-08-31 21:26:51      阅读:434      评论:0      收藏:0      [点我收藏+]

标签:android   style   blog   http   color   io   strong   ar   art   

 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>

 

动画 -- 按钮 --- 从无到有(中心)

标签:android   style   blog   http   color   io   strong   ar   art   

原文地址:http://www.cnblogs.com/androidsj/p/3948165.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!