Android examples for Animation:Fade Animation
create Fade In Animation
//package com.java2s; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; public class Main { private static final int HALF_A_SECOND = 500; private static final float VISIBLE = 1.0f; private static final float INVISIBLE = 0.0f; /**/*from w w w. jav a 2 s . c om*/ * @return A fade in animation from 0% - 100% taking half a second */ public static Animation createFadeInAnimation() { Animation animation = new AlphaAnimation(INVISIBLE, VISIBLE); animation.setDuration(HALF_A_SECOND); return animation; } }