Want to animate your activity from right to left when you click the home icon in the top left corner of your app?

Simples:


public static void goHomeTop(Activity context) {

final Intent intent = new Intent(context, HomeActivity.class);

intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);

context.startActivity(intent);

context.overridePendingTransition(android.R.anim.slide_in_left, android.R.anim.slide_out_right);

}

Advertisements