Exemplo n.º 1
0
 private void slideUp() {
   ViewPropertyAnimator.animate(mView)
       .setStartDelay(1000)
       .alpha(0f)
       .translationY(-mView.getHeight() + mTranslationY)
       .setInterpolator(new AccelerateInterpolator())
       .setDuration(300)
       .start();
 }
Exemplo n.º 2
0
 public LoadToast show() {
   if (!mInflated) {
     mShowCalled = true;
     return this;
   }
   mView.show();
   ViewHelper.setTranslationX(mView, (mParentView.getWidth() - mView.getWidth()) / 2);
   ViewHelper.setAlpha(mView, 0f);
   ViewHelper.setTranslationY(mView, -mView.getHeight() + mTranslationY);
   // mView.setVisibility(View.VISIBLE);
   ViewPropertyAnimator.animate(mView)
       .alpha(1f)
       .translationY(25 + mTranslationY)
       .setInterpolator(new DecelerateInterpolator())
       .setDuration(300)
       .setStartDelay(0)
       .start();
   return this;
 }