Example #1
0
 private android.animation.Animator makeInAnimation()
 {
     mClose.setTranslationX(-mClose.getWidth() - ((android.view.ViewGroup.MarginLayoutParams
                                                   )mClose.getLayoutParams()).leftMargin);
     android.animation.ObjectAnimator buttonAnimator = android.animation.ObjectAnimator
                                                       .ofFloat(mClose, "translationX", 0);
     buttonAnimator.setDuration(200);
     buttonAnimator.addListener(this);
     buttonAnimator.setInterpolator(new android.view.animation.DecelerateInterpolator(
                                        ));
     android.animation.AnimatorSet         set = new android.animation.AnimatorSet();
     android.animation.AnimatorSet.Builder b   = set.play(buttonAnimator);
     if (mMenuView != null)
     {
         int count = mMenuView.getChildCount();
         if (count > 0)
         {
             {
                 int i = count - 1;
                 int j = 0;
                 for (; i >= 0; i--, j++)
                 {
                     android.view.View child = mMenuView.getChildAt(i);
                     child.setScaleY(0);
                     android.animation.ObjectAnimator a = android.animation.ObjectAnimator.ofFloat(child
                                                                                                   , "scaleY", 0, 1);
                     a.setDuration(100);
                     a.setStartDelay(j * 70);
                     b.with(a);
                 }
             }
         }
     }
     return(set);
 }