zoukankan      html  css  js  c++  java
  • Property Animation(属性动画)

     1     /**
     2      * 
     3      * @param view
     4      */
     5     private void getAnimations(View view) {
     6 
     7         ObjectAnimator.ofFloat(view, "aplha", 0f,
     8                 1f).setDuration(100).start();
     9         // ObjectAnimator tAnimator2 = ObjectAnimator.ofFloat(view, "scaleY",
    10         // mZoomLevel);
    11 
    12         ObjectAnimator tAnimator3 = ObjectAnimator.ofFloat(view, "scaleX",
    13                 mZoomLevel);
    14         ObjectAnimator tAnimator4 = ObjectAnimator.ofFloat(view, "scaleY",
    15                 mZoomLevel);
    16 
    17         AnimatorSet tAnimatorSet = new AnimatorSet();
    18         tAnimatorSet.setDuration(1);
    19 
    20         tAnimatorSet.playTogether(tAnimator3, tAnimator4);
    21         tAnimatorSet.start();
    22     }
    23 
    24     /**
    25      * 初始化View
    26      * 
    27      * @param view
    28      */
    29     private void initView(View view) {
    30 
    31         ObjectAnimator tAnimator1 = ObjectAnimator.ofFloat(view, "pivotX", 0f);
    32         ObjectAnimator tAnimator2 = ObjectAnimator.ofFloat(view, "pivotY", 0f);
    33 
    34         ObjectAnimator tAnimator3 = ObjectAnimator.ofFloat(view, "scaleX",
    35                 (float) mViewVsScrAmpMul);
    36         ObjectAnimator tAnimator4 = ObjectAnimator.ofFloat(view, "scaleY",
    37                 (float) mViewVsScrAmpMul);
    38 
    39         AnimatorSet tAnimatorSet = new AnimatorSet();
    40         tAnimatorSet.setDuration(1);
    41         tAnimatorSet.playTogether(tAnimator1, tAnimator2, tAnimator3,
    42                 tAnimator4);
    43 
    44         tAnimatorSet.start();
    45     }
  • 相关阅读:
    python import语句
    python输出中文
    python字典的格式化字符串
    emacs查找替换
    emacs书签
    [转]Ubuntu11.10 更改登录界面背景(LightDM背景)
    ubuntu samba共享文件
    emacs笔记
    .NET登录验证码实现
    WEB标准学习实践(一)
  • 原文地址:https://www.cnblogs.com/zx-blog/p/11835859.html
Copyright © 2011-2022 走看看