translate View along X axes - Android User Interface

Android examples for User Interface:View Translate

Description

translate View along X axes

Demo Code


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

public class Main {
    public static void translateX(View view, int transX, int duration,
            int startDelay) {
        view.animate().translationX(transX).setDuration(duration)
                .setStartDelay(startDelay);
    }/*from   w ww .  ja  v  a  2s .c  o  m*/
}

Related Tutorials