Example usage for android.view.animation AccelerateInterpolator AccelerateInterpolator

List of usage examples for android.view.animation AccelerateInterpolator AccelerateInterpolator

Introduction

In this page you can find the example usage for android.view.animation AccelerateInterpolator AccelerateInterpolator.

Prototype

public AccelerateInterpolator() 

Source Link

Usage

From source file:org.anurag.file.quest.TaskerActivity.java

/**
 * Creates the animation set for previous ViewFlippers when loaded.
 * @return a customized animation for mViewFlippers
 *//*from w  w  w  .j  a v  a2s .c om*/
private static Animation prevAnim() {
    Animation anim = new TranslateAnimation(Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT,
            0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f);
    anim.setDuration(100);
    anim.setInterpolator(new AccelerateInterpolator());
    return anim;
}

From source file:com.android.launcher2.Launcher.java

private Cling initCling(int clingId, int[] positionData, boolean animate, int delay) {
    final Cling cling = (Cling) findViewById(clingId);
    if (cling != null) {
        cling.init(this, positionData);
        cling.setVisibility(View.VISIBLE);
        cling.setLayerType(View.LAYER_TYPE_HARDWARE, null);
        if (animate) {
            cling.buildLayer();//w w  w  .jav a 2  s  .  com
            cling.setAlpha(0f);
            cling.animate().alpha(1f).setInterpolator(new AccelerateInterpolator())
                    .setDuration(SHOW_CLING_DURATION).setStartDelay(delay).start();
        } else {
            cling.setAlpha(1f);
        }
        cling.setFocusableInTouchMode(true);
        cling.post(new Runnable() {
            public void run() {
                cling.setFocusable(true);
                cling.requestFocus();
            }
        });
        mHideFromAccessibilityHelper.setImportantForAccessibilityToNo(mDragLayer,
                clingId == R.id.all_apps_cling);
    }
    return cling;
}