Example usage for android.app Activity finish

List of usage examples for android.app Activity finish

Introduction

In this page you can find the example usage for android.app Activity finish.

Prototype

public void finish() 

Source Link

Document

Call this when your activity is done and should be closed.

Usage

From source file:Main.java

public static void finishAllActivity() {
    for (Activity activity : activityStack) {
        if (activity != null) {
            activity.finish();
        }/*from  w w  w.j a  va2s . c o  m*/
    }
    activityStack.clear();
}

From source file:Main.java

public static void finishAllActivity() {
    for (Activity activity : mActivityList) {
        if (!activity.isFinishing())
            activity.finish();
    }/*from   w  w w . j  a  va 2  s  .  co m*/
}

From source file:Main.java

public static void removeActivity(Activity activity) {
    if ((activityList != null) && (activity != null)) {
        activity.finish();
        activityList.remove(activity);/*from   w w w .  ja  v  a 2s. com*/
        activity = null;
    }
}

From source file:Main.java

public static void finishAllActivity() {
    for (Activity activity : activities) {
        if (!activity.isFinishing()) {
            activity.finish();
        }/*from   w w  w.  java 2 s  .c  o  m*/
    }
}

From source file:Main.java

public static void finishAllActivity() {
    for (Activity activity : activityMan) {
        if (!activity.isFinishing()) {
            activity.finish();
        }//from   ww w .  j a v  a  2  s . c o  m
    }
}

From source file:Main.java

public static void finishAll() {
    for (Activity activity : mActivities) {
        if (!activity.isFinishing()) {
            activity.finish();
        }//from   w  ww. j  av  a 2 s  . com
    }
}

From source file:Main.java

public static void finishAll() {
    for (Activity activity : activities) {
        if (!activity.isFinishing()) {
            activity.finish();
        }//from  www. j  a v a 2  s.co  m
    }
}

From source file:Main.java

public static void startActivityAndFinishSelf(Activity activity, Class clz) {
    activity.startActivity(new Intent(activity, clz));
    activity.finish();
}

From source file:Main.java

public static void finishAll() {
    for (Activity activity : mActivities) {
        if (!activity.isFinishing()) {
            activity.finish();
        }/*w  w  w .j  a  v  a  2s. c  o m*/
    }
    mActivities.clear();
}

From source file:Main.java

/**
 * Start the precondition activity using a given intent, which should
 * have been created by calling createPreconditionIntent.
 * @param activity// www.  j a  va  2  s. com
 * @param intent
 */
public static void startPreconditionActivityAndFinish(Activity activity, Intent intent) {
    activity.startActivity(intent);
    activity.finish();
}