switch To Activity With Fade Effect - Android Animation

Android examples for Animation:Fade Animation

Description

switch To Activity With Fade Effect

Demo Code


//package com.java2s;

import android.app.Activity;

import android.content.Intent;

public class Main {
    public static void switchToWithFadeEffect(Activity activity,
            Intent intent) {/*from  w w w  . j  av  a2  s.  c  o  m*/
        activity.startActivity(intent);
        activity.overridePendingTransition(android.R.anim.fade_in,
                android.R.anim.fade_out);
    }
}

Related Tutorials