当前位置: 首页>>代码示例>>Java>>正文


Java FastOutLinearInInterpolator类代码示例

本文整理汇总了Java中android.support.v4.view.animation.FastOutLinearInInterpolator的典型用法代码示例。如果您正苦于以下问题:Java FastOutLinearInInterpolator类的具体用法?Java FastOutLinearInInterpolator怎么用?Java FastOutLinearInInterpolator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


FastOutLinearInInterpolator类属于android.support.v4.view.animation包,在下文中一共展示了FastOutLinearInInterpolator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: DisappearingAnimator

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
public DisappearingAnimator(boolean removeDialog) {
    mIsDialogClosing = removeDialog;

    Animator sheetFader = ObjectAnimator.ofFloat(
            mRequestView, View.ALPHA, mRequestView.getAlpha(), 0f);
    Animator sheetTranslator = ObjectAnimator.ofFloat(
            mRequestView, View.TRANSLATION_Y, 0f, mAnimatorTranslation);

    AnimatorSet current = new AnimatorSet();
    current.setDuration(DIALOG_EXIT_ANIMATION_MS);
    current.setInterpolator(new FastOutLinearInInterpolator());
    if (mIsDialogClosing) {
        Animator scrimFader = ObjectAnimator.ofInt(mFullContainer.getBackground(),
                AnimatorProperties.DRAWABLE_ALPHA_PROPERTY, 127, 0);
        current.playTogether(sheetFader, sheetTranslator, scrimFader);
    } else {
        current.playTogether(sheetFader, sheetTranslator);
    }

    mSheetAnimator = current;
    mSheetAnimator.addListener(this);
    mSheetAnimator.start();
}
 
开发者ID:rkshuai,项目名称:chromium-for-android-56-debug-video,代码行数:24,代码来源:PaymentRequestUI.java

示例2: startAnimationExpand

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
private void startAnimationExpand(int position, float startZ, float startY, float scaleX, float scaleY) {
    transitionAnimHiddenView = new TransitionAnimation(hiddenViews.get(position));
    transitionAnimHiddenView.setInterpolator(new FastOutLinearInInterpolator());

    transitionAnimHiddenView.startAnimation(startZ,
            0,
            TransitionAnimation.AnimationType.TRANSLATION_Z);

    transitionAnimHiddenView.startAnimation(startY,
            0,
            TransitionAnimation.AnimationType.TRANSLATION_Y);

    transitionAnimHiddenView.startAnimation(scaleX,
            valueHandler.getMaxScale(),
            TransitionAnimation.AnimationType.SCALE_X);

    transitionAnimHiddenView.startAnimation(scaleY,
            valueHandler.getMaxScale(),
            TransitionAnimation.AnimationType.SCALE_Y);
}
 
开发者ID:AppliKey,项目名称:Sunstrike,代码行数:21,代码来源:AnimationController.java

示例3: initInterpolations

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
private void initInterpolations() {
    ArrayList<Class> interpolatorList = new ArrayList<Class>() {{
        add(FastOutSlowInInterpolator.class);
        add(BounceInterpolator.class);
        add(LinearInterpolator.class);
        add(DecelerateInterpolator.class);
        add(CycleInterpolator.class);
        add(AnticipateInterpolator.class);
        add(AccelerateDecelerateInterpolator.class);
        add(AccelerateInterpolator.class);
        add(AnticipateOvershootInterpolator.class);
        add(FastOutLinearInInterpolator.class);
        add(LinearOutSlowInInterpolator.class);
        add(OvershootInterpolator.class);
    }};

    try {
        interpolatorSelector = (Interpolator) interpolatorList.get(animateSelector).newInstance();
    } catch (Exception e) {
        e.printStackTrace();
    }
}
 
开发者ID:ceryle,项目名称:SegmentedButton,代码行数:23,代码来源:SegmentedButtonGroup.java

示例4: createBaseAfiAnimator

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
private ValueAnimator createBaseAfiAnimator(int current,
                                            int desired,
                                            float velocity,
                                            final View afiView) {
    int difference = Math.abs(desired - current);
    long duration = (long) (difference / velocity);
    final ValueAnimator valueAnimator = ValueAnimator.ofInt(current, desired);
    valueAnimator.setDuration(duration);
    valueAnimator.setInterpolator(new FastOutLinearInInterpolator());
    valueAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {

        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            afiView.getLayoutParams().height = (int) animation.getAnimatedValue();
            afiView.requestLayout();
        }
    });
    return valueAnimator;
}
 
开发者ID:TapTrack,项目名称:TappyBLE,代码行数:20,代码来源:DetectType4CommandAdapter.java

示例5: collapse

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
/**
 * Collapse any view with a cool animation
 *
 * @param v
 */
public static void collapse(final View v) {
    final int initialHeight = v.getMeasuredHeight();

    Animation a = new Animation() {
        @Override
        protected void applyTransformation(float interpolatedTime, Transformation t) {
            if (interpolatedTime == 1) {
                v.setVisibility(View.GONE);
            } else {
                v.getLayoutParams().height = initialHeight - (int) (initialHeight * interpolatedTime);
                v.requestLayout();
            }
        }

        @Override
        public boolean willChangeBounds() {
            return true;
        }
    };

    //a.setDuration((int)(initialHeight / v.getContext().getResources().getDisplayMetrics().density));
    a.setDuration(300);
    a.setInterpolator(new FastOutLinearInInterpolator());
    v.startAnimation(a);
}
 
开发者ID:RiccardoBusetti,项目名称:Colombo,代码行数:31,代码来源:ExpandAnimationUtil.java

示例6: prepareCircularReveal

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void prepareCircularReveal(View startView, FrameLayout targetView) {
    int centerX = (startView.getLeft() + startView.getRight()) / 2;
    // Subtract the start view's height to adjust for relative coordinates on screen.
    int centerY = (startView.getTop() + startView.getBottom()) / 2 - startView.getHeight();
    float endRadius = (float) Math.hypot(centerX, centerY);
    mCircularReveal = ViewAnimationUtils.createCircularReveal(
            targetView, centerX, centerY, startView.getWidth(), endRadius);
    mCircularReveal.setInterpolator(new FastOutLinearInInterpolator());

    mCircularReveal.addListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationEnd(Animator animation) {
            mIcon.setVisibility(View.GONE);
            mCircularReveal.removeListener(this);
        }
    });
    // Adding a color animation from the FAB's color to transparent creates a dissolve like
    // effect to the circular reveal.
    int accentColor = ContextCompat.getColor(this, mCategory.getTheme().getAccentColor());
    mColorChange = ObjectAnimator.ofInt(targetView,
            ViewUtils.FOREGROUND_COLOR, accentColor, Color.TRANSPARENT);
    mColorChange.setEvaluator(new ArgbEvaluator());
    mColorChange.setInterpolator(mInterpolator);
}
 
开发者ID:vanpersie9987,项目名称:android-topeka,代码行数:26,代码来源:QuizActivity.java

示例7: onSingleTapUp

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
@Override public boolean onSingleTapUp(MotionEvent e) {
  View nextView = getNext();
  nextView.bringToFront();
  nextView.setVisibility(View.VISIBLE);

  final float finalRadius =
      (float) Math.hypot(nextView.getWidth() / 2f, nextView.getHeight() / 2f) + hypo(
          nextView, e);

  Animator revealAnimator =
      ViewAnimationUtils.createCircularReveal(nextView, (int) e.getX(), (int) e.getY(), 0,
          finalRadius, View.LAYER_TYPE_HARDWARE);

  revealAnimator.setDuration(MainActivity.SLOW_DURATION);
  revealAnimator.setInterpolator(new FastOutLinearInInterpolator());
  revealAnimator.start();

  return true;
}
 
开发者ID:joelan,项目名称:CircleReveal,代码行数:20,代码来源:RadialTransformationActivity.java

示例8: validateSetOfObjectAnimatorAlphaMotionTiming

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
@Test
public void validateSetOfObjectAnimatorAlphaMotionTiming() {
  MotionSpec spec =
      MotionSpec.createFromResource(
          activityTestRule.getActivity(), R.animator.valid_set_of_object_animator_motion_spec);
  MotionTiming alpha = spec.getTiming("alpha");

  assertEquals(3, alpha.getDelay());
  assertEquals(5, alpha.getDuration());
  if (VERSION.SDK_INT >= VERSION_CODES.LOLLIPOP) {
    assertThat(alpha.getInterpolator(), instanceOf(PathInterpolator.class));
  } else {
    assertThat(alpha.getInterpolator(), instanceOf(FastOutLinearInInterpolator.class));
  }
  assertEquals(7, alpha.getRepeatCount());
  assertEquals(ValueAnimator.RESTART, alpha.getRepeatMode());
}
 
开发者ID:material-components,项目名称:material-components-android,代码行数:18,代码来源:MotionSpecTest.java

示例9: launchCirclesAnimation

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
private void launchCirclesAnimation() {
    circleTwo.setScaleX(0f);
    circleTwo.setScaleY(0f);
    circleThree.setScaleX(0f);
    circleThree.setScaleY(0f);

    ObjectAnimator animator = getCircleAnimation(circleOne, CIRCLE_ANIMATION_TIME);
    animator.setRepeatMode(ValueAnimator.RESTART);
    animator.setRepeatCount(ValueAnimator.INFINITE);
    animator.setInterpolator(new FastOutLinearInInterpolator());
    animator.start();

    ObjectAnimator animator2 = getCircleAnimation(circleTwo, CIRCLE_ANIMATION_TIME);
    animator2.setStartDelay(CIRCLE_ANIMATION_DELAY_ONE);
    animator2.setRepeatMode(ValueAnimator.RESTART);
    animator2.setRepeatCount(ValueAnimator.INFINITE);
    animator.setInterpolator(new BounceInterpolator());
    animator2.start();

    ObjectAnimator animator3 = getCircleAnimation(circleThree, CIRCLE_ANIMATION_TIME);
    animator3.setStartDelay(CIRCLE_ANIMATION_DELAY_TWO);
    animator3.setRepeatMode(ValueAnimator.RESTART);
    animator3.setRepeatCount(ValueAnimator.INFINITE);
    animator.setInterpolator(new AccelerateDecelerateInterpolator());
    animator3.start();
}
 
开发者ID:Aracem,项目名称:android-complex-animation,代码行数:27,代码来源:PostAJobAnimatedView.java

示例10: executeTransition

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
public void executeTransition() {
    postponeEnterTransition();

    final View decorView = getWindow().getDecorView();
    getWindow().getDecorView().getViewTreeObserver().addOnPreDrawListener(new ViewTreeObserver.OnPreDrawListener() {
        @Override
        public boolean onPreDraw() {
            decorView.getViewTreeObserver().removeOnPreDrawListener(this);
            supportStartPostponedEnterTransition();
            return true;
        }
    });

    MyTransition transition = new MyTransition();
    transition.setPositionDuration(300);
    transition.setSizeDuration(300);
    transition.setPositionInterpolator(new FastOutLinearInInterpolator());
    transition.setSizeInterpolator(new FastOutSlowInInterpolator());
    transition.addTarget("message");

    getWindow().setSharedElementEnterTransition(transition);
}
 
开发者ID:qibin0506,项目名称:TransitionAnimator,代码行数:23,代码来源:MessageActivity.java

示例11: animateInText

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
/**
 * Animates the tooltip into view with a simple slide and fade animation,
 * then schedules the tooltip to automatically dismiss itself.
 *
 * @param onDismissListener A functor to call if the tooltip is dismissed without user intervention.
 */
private void animateInText(final @NonNull OnDismissListener onDismissListener) {
    final int overlap = getResources().getDimensionPixelSize(R.dimen.view_info_tooltip_overlap);
    animatorFor(text, animatorContext)
            .withInterpolator(new FastOutLinearInInterpolator())
            .slideYAndFade(overlap, 0f, 0f, 1f)
            .addOnAnimationCompleted(new OnAnimationCompleted() {
                @Override
                public void onAnimationCompleted(boolean finished) {
                    postDelayed(new Runnable() {
                        @Override
                        public void run() {
                            if (Anime.isAnimating(text) || !isShown()) {
                                return;
                            }

                            onDismissListener.onInfoTooltipDismissed();
                            dismiss(false);
                        }
                    }, VISIBLE_DURATION);
                }
            })
            .start();
}
 
开发者ID:hello,项目名称:anime-android-go-99,代码行数:30,代码来源:InfoTooltipView.java

示例12: updateFabTranslationForSnackbar

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
private void updateFabTranslationForSnackbar(CoordinatorLayout parent,
    SkittleContainer container, View snackbar) {
  float translationY = this.getFabTranslationYForSnackbar(parent, container);
  if ((translationY == -snackbar.getHeight())) {
    ViewCompat.animate(container)
        .translationY(-translationY)
        .setInterpolator(new FastOutLinearInInterpolator())
        .setListener(null);
  } else if (translationY != this.mTranslationY) {
    ViewCompat.animate(container).cancel();
    if (Math.abs(translationY - this.mTranslationY) == (float) snackbar.getHeight()) {
      ViewCompat.animate(container)
          .translationY(translationY)
          .setInterpolator(new FastOutLinearInInterpolator())
          .setListener(null);
    } else {
      ViewCompat.setTranslationY(container, translationY);
    }

    this.mTranslationY = translationY;
  }
}
 
开发者ID:aashrairavooru,项目名称:Skittles,代码行数:23,代码来源:SkittleContainer.java

示例13: dismissDialog

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
private void dismissDialog() {
    if (mDialogInOutAnimator != null || !isShowing()) return;

    Animator dropDown =
            ObjectAnimator.ofFloat(mLayout, View.TRANSLATION_Y, 0f, mLayout.getHeight());
    Animator fadeOut = ObjectAnimator.ofFloat(mLayout, View.ALPHA, mLayout.getAlpha(), 0f);
    AnimatorSet animatorSet = new AnimatorSet();
    animatorSet.playTogether(dropDown, fadeOut);

    mDialogInOutAnimator = animatorSet;
    mDialogInOutAnimator.setDuration(DIALOG_EXIT_ANIMATION_MS);
    mDialogInOutAnimator.setInterpolator(new FastOutLinearInInterpolator());
    mDialogInOutAnimator.addListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationEnd(Animator animation) {
            mDialogInOutAnimator = null;
            dismiss();
        }
    });

    mDialogInOutAnimator.start();
}
 
开发者ID:mogoweb,项目名称:365browser,代码行数:23,代码来源:EditorDialog.java

示例14: onHeaderRefreshComplete

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
/**
 * header view 完成更新后恢复初始状态
 */
public void onHeaderRefreshComplete() {
    mHeaderState = PULL_TO_REFRESH;
    upAnimator = ValueAnimator.ofInt(getHeaderTopMargin(), -mHeaderViewHeight);
    upAnimator.setDuration(100);
    upAnimator.setInterpolator(new FastOutLinearInInterpolator());
    upAnimator.start();
    upAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            int value = (int) animation.getAnimatedValue();
            setHeaderTopMargin(value);
        }
    });
    mHeaderImageView.setVisibility(View.VISIBLE);
    mHeaderImageView.setImageResource(android.R.drawable.arrow_down_float);
    mHeaderTextView.setText(R.string.pull_to_refresh_pull_label);
    mHeaderProgressBar.setVisibility(View.GONE);
    if (mOnHeaderRefreshListener != null) {
        mOnHeaderRefreshListener.onHeaderRefreshFinished();
    }
    // mHeaderUpdateTextView.setText("");


}
 
开发者ID:lovejjfg,项目名称:MyBlogDemo,代码行数:28,代码来源:HeaderView.java

示例15: toggleSkittles

import android.support.v4.view.animation.FastOutLinearInInterpolator; //导入依赖的package包/类
private void toggleSkittles(View child, int index) {

        int duration = 200;
        FastOutLinearInInterpolator interpolator = new FastOutLinearInInterpolator();

        ObjectAnimator animator = ObjectAnimator.ofPropertyValuesHolder(child,
                PropertyValuesHolder.ofFloat("Y", child.getY() + child.getMeasuredHeight() / 2,
                        child.getY()), PropertyValuesHolder.ofFloat("alpha", 0, 1))
                .setDuration(duration);
        animator.setInterpolator(interpolator);

        if (flag == 0) {
            animator.setStartDelay((skittleContainer.getChildCount() - index) * 15);
            Log.d("Skittle Layout", "Animation");
            animator.start();
        } else {
            animator.setStartDelay(index * 15);
            animator.addListener(this);
            animator.reverse();
        }
    }
 
开发者ID:xu6148152,项目名称:binea_project_for_android,代码行数:22,代码来源:SkittleLayout.java


注:本文中的android.support.v4.view.animation.FastOutLinearInInterpolator类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。