Android examples for Animation:Slide Animation
To animate view slide out from right to left
//package com.java2s; import android.view.View; import android.view.animation.TranslateAnimation; public class Main { /**/* w w w. ja va2s.c o m*/ * To animate view slide out from right to left * * @param view */ public static void slideToLeft(View view) { TranslateAnimation animate = new TranslateAnimation(40, 0, 0, 0); animate.setDuration(500); animate.setFillAfter(false); view.startAnimation(animate); } }