zoukankan      html  css  js  c++  java
  • 动画 -- 按钮 --- 从无到有(中心)

     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>
  • 相关阅读:
    网页CSS2
    C#(1)—类型、常量及变量
    进制转化
    12月26日提纲
    12月24日笔记
    12月23日笔记
    12月22日笔记
    12月21日笔记
    12月20日笔记
    break、continue与数组
  • 原文地址:https://www.cnblogs.com/androidsj/p/3948165.html
Copyright © 2011-2022 走看看