Java tutorial
//package com.java2s; import android.app.Activity; public class Main { public static void fadeInAndOut(Activity activity) { activity.overridePendingTransition(android.R.anim.fade_in, android.R.anim.fade_out); } }