two Point TranslateAnimation - Android android.animation

Android examples for android.animation:TranslateAnimation

Description

two Point TranslateAnimation

Demo Code


//package com.java2s;
import android.view.animation.*;
import android.widget.ImageView;

public class Main {
    public static void twoPoint(ImageView imageview, float f, float f1,
            int i, int j) {
        TranslateAnimation translateanimation = new TranslateAnimation(
                0.0F, f, 0.0F, f1);//from   ww w  . jav a 2s .  c  o  m
        translateanimation.setFillAfter(true);
        translateanimation.setDuration(j);
        imageview.startAnimation(translateanimation);
    }
}

Related Tutorials