Android examples for Animation:Move Animation
move Down Animation
//package com.java2s; import android.view.animation.Animation; import android.view.animation.LinearInterpolator; import android.view.animation.TranslateAnimation; public class Main { public static Animation moveDown(int height) { // TODO Auto-generated method stub Animation moveDown = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f,// ww w .j a va 2 s . c om Animation.ABSOLUTE, -height, Animation.ABSOLUTE, 0 ); moveDown.setDuration(200); moveDown.setInterpolator(new LinearInterpolator()); return moveDown; } }