Android examples for User Interface:Fragment
add And Hide Fragment
//package com.java2s; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; public class Main { public static void addAndHideFragment(FragmentManager fm, int containerId, Fragment fragment, String tag) { fm.beginTransaction().add(containerId, fragment, tag) .hide(fragment).commitAllowingStateLoss(); }//from w w w . j a v a 2s. com }