clear Back Stack for Intent - Android Intent

Android examples for Intent:Open App

Description

clear Back Stack for Intent

Demo Code


//package com.java2s;

import android.content.Intent;

public class Main {
    public static Intent clearBackStack(Intent i) {
        i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
        i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
        return i;
    }//  w ww.j  a v a  2 s.c o  m
}

Related Tutorials