Code example for AccelerateInterpolator

Methods: setInterpolator

0
    } 
     
    private void switchView(final View foreView, final View backView) {
        backView.setVisibility(View.INVISIBLE);
        backView.animate().setDuration(0).scaleX(0);
        foreView.animate().setDuration(250).setInterpolator(new AccelerateInterpolator(1.5f)).scaleX(0).setListener(new AnimatorListener() {
            @Override 
            public void onAnimationStart(Animator animation) {
            } 
            @Override 
            public void onAnimationRepeat(Animator animation) {
            } 
            @Override 
            public void onAnimationEnd(Animator animation) {
                backView.animate().setDuration(250).setInterpolator(new DecelerateInterpolator(1.5f)).scaleX(1);
                backView.setVisibility(View.VISIBLE);
                foreView.setVisibility(View.INVISIBLE);
            } 
            @Override 
            public void onAnimationCancel(Animator animation) {
Stop searching for code, let great code find you!  Add Codota to your java IDE