Android examples for User Interface:Fragment
show And Hide Fragments
//package com.java2s; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; public class Main { public static void showAndHideFragments(FragmentManager fm, Fragment showFragment, Fragment hideFragment, int inAnimationId, int outAnimationId) { fm.beginTransaction()/*www .j av a 2 s . com*/ .setCustomAnimations(inAnimationId, outAnimationId) .hide(hideFragment).show(showFragment) .commitAllowingStateLoss(); } }