pop Activity To - Android android.app

Android examples for android.app:Activity Navigation

Description

pop Activity To

Demo Code

import android.content.Context;
import android.content.Intent;

public class Main {

  public static void popTo(Context context, Class<?> main) {
    Intent intent = new Intent(context, main);
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    context.startActivity(intent);/*from   w ww .j a  v a 2  s.c om*/
  }

  public static void popTo(Context context, Intent intent) {
    intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
    context.startActivity(intent);
  }

}

Related Tutorials