create No Animation Animator - Android android.animation

Android examples for android.animation:Animator

Description

create No Animation Animator

Demo Code


//package com.java2s;
import android.animation.Animator;

import android.animation.ValueAnimator;

import android.view.View;

import android.view.animation.LinearInterpolator;

public class Main {
    public static Animator createNoAnimationAnimator(View view) {
        ValueAnimator anim = ValueAnimator.ofInt(0, 1);
        anim.setInterpolator(new LinearInterpolator());
        anim.setDuration(1);//from  w w  w . j  ava2 s. com

        return anim;
    }
}

Related Tutorials