clear Back Stack - Android User Interface

Android examples for User Interface:Fragment

Description

clear Back Stack

Demo Code


//package com.java2s;

import android.support.v4.app.FragmentManager;

public class Main {
    public static void clearBackStack(FragmentManager fm) {
        for (int i = 0; i < fm.getBackStackEntryCount(); i++) {
            fm.popBackStack();/*  w  w w  .  j  a  va 2s.  c  om*/
        }
    }
}

Related Tutorials