Example usage for android.support.v4.view.animation LinearOutSlowInInterpolator LinearOutSlowInInterpolator

List of usage examples for android.support.v4.view.animation LinearOutSlowInInterpolator LinearOutSlowInInterpolator

Introduction

In this page you can find the example usage for android.support.v4.view.animation LinearOutSlowInInterpolator LinearOutSlowInInterpolator.

Prototype

public LinearOutSlowInInterpolator() 

Source Link

Usage

From source file:com.byoutline.kickmaterial.utils.LUtils.java

public static Animation loadAnimationWithLInterpolator(Context context, @AnimRes int animId) {
    return loadAnimationWithLInterpolator(context, animId, new LinearOutSlowInInterpolator());
}

From source file:com.dm.material.dashboard.candybar.utils.Animator.java

public static void showFab(@Nullable FloatingActionButton fab) {
    if (fab == null)
        return;/*from  w  w w. jav a 2 s  . c  o m*/

    if (ViewCompat.isLaidOut(fab)) {
        fab.show();
        return;
    }

    fab.animate().cancel();
    fab.setScaleX(0f);
    fab.setScaleY(0f);
    fab.setAlpha(0f);
    fab.setVisibility(View.VISIBLE);
    fab.animate().setDuration(200).scaleX(1).scaleY(1).alpha(1)
            .setInterpolator(new LinearOutSlowInInterpolator());
}

From source file:com.bachhuberdesign.deckbuildergwent.util.AnimUtils.java

@NonNull
public static Interpolator getLinearOutSlowInInterpolator() {
    if (linearOutSlowIn == null) {
        linearOutSlowIn = new LinearOutSlowInInterpolator();
    }/*from   w  w  w . java  2 s .  c o m*/
    return linearOutSlowIn;
}

From source file:com.erevacation.challenge.rxjavaanimator.ViewAnimatorCreator.java

private static ViewPropertyAnimator animateScaleUp(View view, int duration, int delay,
        TimeInterpolator interpolator) {
    view.setScaleX(0);/*from w  w w . j av a 2  s  . com*/
    view.setScaleY(0);
    ViewPropertyAnimator propertyAnimator = view.animate().scaleX(1).scaleY(1).setStartDelay(delay)
            .setDuration(duration);

    if (interpolator != null) {
        propertyAnimator.setInterpolator(interpolator);
    } else {
        propertyAnimator.setInterpolator(new LinearOutSlowInInterpolator());
    }

    return propertyAnimator;
}

From source file:com.kogitune.prelollipoptransition.fragment.SubFragment.java

@Nullable
@Override// ww w  .j  a va  2 s.  co m
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
        @Nullable Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_sub, container, false);
    final ExitFragmentTransition exitFragmentTransition = FragmentTransition.with(this)
            .interpolator(new LinearOutSlowInInterpolator()).to(v.findViewById(R.id.sub_imageView))
            .start(savedInstanceState);
    exitFragmentTransition.exitListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationStart(Animator animation) {
            Log.d("TAG", "onAnimationStart: ");
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            Log.d("TAG", "onAnimationEnd: ");
        }
    }).interpolator(new FastOutSlowInInterpolator());
    exitFragmentTransition.startExitListening();
    return v;
}

From source file:com.kogitune.prelollipoptransition.fragment.EndFragment.java

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
    View v = inflater.inflate(R.layout.fragment_end, container, false);
    final ExitFragmentTransition exitFragmentTransition = FragmentTransition.with(this)
            .interpolator(new LinearOutSlowInInterpolator()).to(v.findViewById(R.id.fragment_imageView))
            .start(savedInstanceState);//from w  w  w . ja  v a  2s. co m
    exitFragmentTransition.exitListener(new AnimatorListenerAdapter() {
        @Override
        public void onAnimationStart(Animator animation) {
            Log.d("TAG", "onAnimationStart: ");
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            Log.d("TAG", "onAnimationEnd: ");
        }
    }).interpolator(new FastOutSlowInInterpolator());
    exitFragmentTransition.startExitListening();
    return v;
}

From source file:org.hawkular.client.android.util.ViewTransformer.java

@UiThread
public void expand() {
    view.setVisibility(View.VISIBLE);

    ValueAnimator animator = ValueAnimator.ofInt(0, Views.measureHeight(view));
    animator.setInterpolator(new LinearOutSlowInInterpolator());
    animator.setDuration(Durations.MEDIUM);

    animator.addUpdateListener(this);

    animator.start();//from  w  w  w  . j  a va  2 s. c  o  m
}

From source file:com.devbrackets.android.exomedia.ui.animation.TopViewHideShowAnimation.java

public TopViewHideShowAnimation(View view, boolean toVisible, long duration) {
    super(false);
    this.toVisible = toVisible;
    this.animationView = view;

    //Creates the Alpha animation for the transition
    float startAlpha = toVisible ? 0 : 1;
    float endAlpha = toVisible ? 1 : 0;

    AlphaAnimation alphaAnimation = new AlphaAnimation(startAlpha, endAlpha);
    alphaAnimation.setDuration(duration);

    //Creates the Translate animation for the transition
    int startY = toVisible ? -view.getHeight() : 0;
    int endY = toVisible ? 0 : -view.getHeight();
    TranslateAnimation translateAnimation = new TranslateAnimation(0, 0, startY, endY);
    translateAnimation/* ww  w  .j  ava 2 s  . c om*/
            .setInterpolator(toVisible ? new LinearOutSlowInInterpolator() : new FastOutLinearInInterpolator());
    translateAnimation.setDuration(duration);

    //Adds the animations to the set
    addAnimation(alphaAnimation);
    addAnimation(translateAnimation);

    setAnimationListener(new Listener());
}

From source file:android.support.graphics.drawable.AnimationUtilsCompat.java

/**
 * Loads an {@link Interpolator} object from a resource
 *
 * @param context Application context used to access resources
 * @param id      The resource id of the animation to load
 * @return The animation object reference by the specified id
 *///from  w ww .  j  ava 2  s.c  o m
public static Interpolator loadInterpolator(Context context, int id) throws NotFoundException {
    // From API 21, we added path Interpolator .
    if (Build.VERSION.SDK_INT >= 21) {
        return AnimationUtils.loadInterpolator(context, id);
    }

    XmlResourceParser parser = null;
    try {
        // Special treatment for the interpolator introduced at API 21.
        if (id == AndroidResources.FAST_OUT_LINEAR_IN) {
            return new FastOutLinearInInterpolator();
        } else if (id == AndroidResources.FAST_OUT_SLOW_IN) {
            return new FastOutSlowInInterpolator();
        } else if (id == AndroidResources.LINEAR_OUT_SLOW_IN) {
            return new LinearOutSlowInInterpolator();
        }
        parser = context.getResources().getAnimation(id);
        return createInterpolatorFromXml(context, context.getResources(), context.getTheme(), parser);
    } catch (XmlPullParserException ex) {
        NotFoundException rnf = new NotFoundException(
                "Can't load animation resource ID #0x" + Integer.toHexString(id));
        rnf.initCause(ex);
        throw rnf;
    } catch (IOException ex) {
        NotFoundException rnf = new NotFoundException(
                "Can't load animation resource ID #0x" + Integer.toHexString(id));
        rnf.initCause(ex);
        throw rnf;
    } finally {
        if (parser != null)
            parser.close();
    }

}

From source file:org.hawkular.client.android.util.ViewTransformer.java

@UiThread
public void collapse() {
    ValueAnimator animator = ValueAnimator.ofInt(Views.measureHeight(view), 0);
    animator.setInterpolator(new LinearOutSlowInInterpolator());
    animator.setDuration(Durations.MEDIUM);

    animator.addUpdateListener(this);
    animator.addListener(new AnimatorListenerAdapter() {
        @Override/*from   ww w  . j  av a2 s .com*/
        public void onAnimationEnd(Animator animation) {
            view.setVisibility(View.GONE);
        }
    });

    animator.start();
}