Why alpha animation doesn’t work in android?

I want to merge animation in android application.
I’m doing with below code.
but alpha animation doesn’t work.
I don’t have no idea why it doesn’t work.
anyone can help me?

// create set of animations
    AnimationSet login_page_animation = new AnimationSet(false);
    // animations should be applied on the finish line
    login_page_animation.setFillAfter(true);

    // create scale animation
    int white_background_height=((TextView) findViewById(R.id.login_white_backgroud)).getHeight();
    TranslateAnimation translate_animation = new TranslateAnimation(0,0,0,- white_background_height/4);
    translate_animation.setDuration(700);

    // create Alpha animation
    AlphaAnimation alpha_animation=new AlphaAnimation(0.0f,1.0f);
    alpha_animation.setDuration(700);

    // add new animations to the set
    login_page_animation.addAnimation(translate_animation);
    login_page_animation.addAnimation(translate_animation);


Source: android

Leave a Reply