androidx.interpolator.view.animation.FastOutLinearInInterpolator Java Examples

The following examples show how to use androidx.interpolator.view.animation.FastOutLinearInInterpolator. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MotionSpecTest.java    From material-components-android with Apache License 2.0 6 votes vote down vote up
@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());
}
 
Example #2
Source File: PageAnimation.java    From HaoReader with GNU General Public License v3.0 5 votes vote down vote up
@CallSuper
public void init(int w, int h, PageView view, OnPageChangeListener listener) {
    mViewWidth = w;
    mViewHeight = h;

    mView = view;
    mListener = listener;

    mScroller = new Scroller(mView.getContext(), new FastOutLinearInInterpolator());
}
 
Example #3
Source File: Animation.java    From MusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
public static List<Interpolator> getInterpolatorList() {
    List<Interpolator> interpolatorList = new ArrayList<>();
    interpolatorList.add(new LinearInterpolator());
    interpolatorList.add(new AccelerateInterpolator());
    interpolatorList.add(new DecelerateInterpolator());
    interpolatorList.add(new AccelerateDecelerateInterpolator());
    interpolatorList.add(new OvershootInterpolator());
    interpolatorList.add(new AnticipateInterpolator());
    interpolatorList.add(new AnticipateOvershootInterpolator());
    interpolatorList.add(new BounceInterpolator());
    interpolatorList.add(new FastOutLinearInInterpolator());
    interpolatorList.add(new FastOutSlowInInterpolator());
    interpolatorList.add(new LinearOutSlowInInterpolator());
    return interpolatorList;
}
 
Example #4
Source File: Animation.java    From MusicPlayer with GNU General Public License v3.0 5 votes vote down vote up
@NonNull
public static Interpolator getInterpolator(int id) {
    switch (id) {
        case 0:
            return new LinearInterpolator();
        case 1:
            return new AccelerateInterpolator();
        case 2:
            return new DecelerateInterpolator();
        case 3:
            return new AccelerateDecelerateInterpolator();
        case 4:
            return new OvershootInterpolator();
        case 5:
            return new AnticipateInterpolator();
        case 6:
            return new AnticipateOvershootInterpolator();
        case 7:
            return new BounceInterpolator();
        case 8:
            return new FastOutLinearInInterpolator();
        case 9:
            return new LinearInterpolator();
        case 10:
            return new LinearOutSlowInInterpolator();
        default:
            return new FastOutSlowInInterpolator();
    }
}