Beispiel #1
0
 public override void hide()
 {
     if (mCurrentShowAnim != null)
     {
         mCurrentShowAnim.end();
     }
     if (mContainerView.getVisibility() == android.view.View.GONE)
     {
         return;
     }
     if (mShowHideAnimationEnabled)
     {
         mContainerView.setAlpha(1);
         mContainerView.setTransitioning(true);
         android.animation.AnimatorSet         anim = new android.animation.AnimatorSet();
         android.animation.AnimatorSet.Builder b    = anim.play(android.animation.ObjectAnimator
                                                                .ofFloat(mContainerView, "alpha", 0));
         if (mContentView != null)
         {
             b.with(android.animation.ObjectAnimator.ofFloat(mContentView, "translationY", 0,
                                                             -mContainerView.getHeight()));
             b.with(android.animation.ObjectAnimator.ofFloat(mContainerView, "translationY", -
                                                             mContainerView.getHeight()));
         }
         if (mSplitView != null && mSplitView.getVisibility() == android.view.View.VISIBLE)
         {
             mSplitView.setAlpha(1);
             b.with(android.animation.ObjectAnimator.ofFloat(mSplitView, "alpha", 0));
         }
         anim.addListener(mHideListener);
         mCurrentShowAnim = anim;
         anim.start();
     }
     else
     {
         mHideListener.onAnimationEnd(null);
     }
 }