translate View with duration and start delay - Android User Interface

Android examples for User Interface:View Translate

Description

translate View with duration and start delay

Demo Code


//package com.java2s;
import android.view.View;

public class Main {

    public static void translate(View view, int transX, int transY,
            int duration, int startDelay) {
        view.animate().translationX(transX).translationY(transY)
                .setDuration(duration).setStartDelay(startDelay);
    }/*from   www . j  a  v  a2s . c o  m*/
}

Related Tutorials