Android examples for User Interface:Fragment
Method to pop out the fragment.
//package com.java2s; import android.app.Activity; import android.app.FragmentManager; public class Main { /**/*from w ww. j a v a 2 s . c o m*/ * Method to pop out the fragment. * * @param activity Activity * @param tag Tag of the fragment to be popped out * @return true if successfully popped else false */ public static void popFragmentByTag(Activity activity, String tag) { FragmentManager fragmentManager = activity.getFragmentManager(); fragmentManager.popBackStack(); } }